I have followed the documentation on react SSR streaming (doc) and endup having a broken generated html in styled-components v6. The same code works just fine in styled-components v5.3.5.
I understand that new streaming methods in React (renderToPipeableStream) is not supported yet in styled-components (issue). But renderToNodeStream is seemingly supported according to the docs but in practice its breaking.
React SSR Streaming bug
I have followed the documentation on react SSR streaming (doc) and endup having a broken generated html in styled-components v6. The same code works just fine in styled-components v5.3.5.
I understand that new streaming methods in React (renderToPipeableStream) is not supported yet in styled-components (issue). But
renderToNodeStream
is seemingly supported according to the docs but in practice its breaking.Environment
System:
Binaries:
npmPackages:
Reproduction
Minimal reproduction using webpack: https://github.com/chin2km/styled-components-react-streaming-bug
Steps to reproduce
start the application using
yarn dev:ssr
and the html generated for react streaming is broken.Expected Behavior
it works just like when using
renderToString
Actual Behavior
The generated html breaks the html by injecting the