Closed TheAlexGo closed 1 month ago
The templates currently don't support RSC since it requires a much complex bundler setup to get working. A proper running version will also need the next Vite major (v6) environment API.
For now, you can look into some examples like from https://github.com/hi-ogawa/vite-plugins to set it up
Closing this for now
Hello!
I created a project using template-ssr-react-streaming-ts with swc. I created an async Posts component (adding async to the function). When hydrating via entry-client.tsx I get the error "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding
'use client'
to a module that was originally written for the server.".Does anyone know how to fix this?
The error occurs precisely when RSC (Posts.tsx) is hydrated. If only the Card component is hydrated, there will be no error.
My source: