Use renderToPipeableStream
instead of renderToString
in ssr-react
playground
#359
Labels
renderToPipeableStream
instead of renderToString
in ssr-react
playground
#359
Description
The playground ssr-react uses in the
entry-server.jsx
the methodReactDOMServer.renderToString
which does not support streaming or lazy / suspense components. I'd suggest to replace it withReactDOMServer.renderToPipeableStream
.Suggested solution
I have made a working example based on the playground (a tiny bit more complex, but in essence the same) here:
https://github.com/technologiestiftung/vite-react-ssg-example/blob/feat/add-streaming-for-suspense/src/entry-server.tsx
If desired, I can make a PR to add these changes. As far as I can tell, nothing else would need to be changed.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: