vercel / vercel/next.js

Using 'use client' causes infinite loop requests to the backend interface

Open
#87,012 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/JsonLYH/next-core-demo/tree/90b82b52626d5f8c606e2d268dd265e9a0aaedc9/app/(bug)/bug

To Reproduce
Image Image
Current vs. Expected behavior

You shouldn't keep requesting backend interfaces

Provide environment information
"dependencies": {
    "babel-plugin-react-compiler": "^1.0.0",
    "next": "16.0.7",
    "react": "19.2.0",
    "react-dom": "19.2.0"
  },
Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction at app/(bug)/bug in the JsonLYH/next-core-demo repository and run it with the listed Next.js, React, and React DOM versions. Trace the behavior after applying 'use client' and verify that backend interfaces are no longer requested repeatedly; the expected result is a single appropriate request rather than an infinite loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.