Passing data to both client & server component result in always async server tree #74793
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Turbopack
Related to Turbopack with Next.js.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://stackblitz.com/edit/stackblitz-starters-ex8vzvqf?file=app%2Fpage.tsx
To Reproduce
page.tsx
,components/client.tsx
andcomponents/server.tsx
.InternalClientComponent
componentCurrent vs. Expected behavior
InternalClientComponent
should be of type:Symbol(React.element)
(orSymbol(React.transitional.element)
in react-19)Symbol(React.lazy)
indicating that they are suspending or awaiting smth, but they are not, they are a simple<button>
element.IMPORTANT NOTES:
data
property to either theClientComponent
orServerComponent
resolves the issue, pointing me that this is mostly related to the data reference, not the components themselves.data
is of primitive type, it's also workingbuild
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app, Turbopack, Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I tested a different combinations of next 14/15 & react 18/19 as well as
dev
&build
commands and with--turbo
flag and webpack respectively - the issue is consistently reproducable since [email protected]I suspect that passing once a reference to a variable get's passed to a client component it gets turned to a promise so it can travel through the network, however there are also server component that are incorrectly reading the promise (instead of the original variable) which turns them into an async tree -> thus subsequent client components are receiving
async
server components regardless if they are suspending or not.The text was updated successfully, but these errors were encountered: