Resolved error of client component wrapped by server component when using Suspense in turbopack dev mode #80481
Unanswered
suuf
asked this question in
Show and tell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I was going to open a bug report, but canary release
15.4.0-canary.76
fixes my issue, so I thought I would create a discussion in case anyone else comes across this.I had a server component wrapped in <Suspense> in page.tsx, where I acquired data, and then passed them in a client component (i.e. with 'use client' at its top).
When running
next dev --turbopack
, if I changed something in the client component (i.e. added a console.log(...)), I would get an error likeTypeError: Cannot read properties of null (reading 'useState')
on lines where any client-specific features were used.next dev
instead ofnext dev --turbopack
, and the error would be gone. And finally,15.4.0-canary.76
and keep Suspense, without losing turbopack, and without using dynamic (and live with the potential lack of stability of canary releases) 🎉Beta Was this translation helpful? Give feedback.
All reactions