Using 'use client' causes infinite loop requests to the backend interface
Link to the code that reproduces this issue
https://github.com/JsonLYH/next-core-demo/tree/90b82b52626d5f8c606e2d268dd265e9a0aaedc9/app/(bug)/bug
To Reproduce
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
Broswer Console Warning: Only Server Components can be async at the moment.
Client components are used for interaction, and asynchronous logic is implemented through useEffect, and cannot be directly defined as an async function itself.
https://nextjs.org/docs/app/getting-started/server-and-client-components
Hi, client components can't be async.
What are you trying to accomplish here?
Hi, client components can't be async.
What are you trying to accomplish here? I just want to try and see if there will be any errors in writing that does not meet the requirements
Hi, client components can't be async.
What are you trying to accomplish here?
The result is not an error, but an infinite loop request to the backend interface
Mm yeah, I'd rephrase the title to, build step should error when async components are present in client graph, or something like that.
I am no expert on the bundler internals, but it feels like the bundler should be able to warn about the async Page on static analysis. This pattern is not supported, and it leads to a lot weird errors.