Closed
Description
If you use the bootstrapScriptContent
option of renderToPipeableStream()
to provide hydration data (as recommended in the <script> upgrade guide) with JSON.stringify()
it doesn’t work because React escapes HTML characters in bootstrapScriptContent
like quotes. I’ve worked around this by using backticks to deliniate strings.
What’s the correct thing to do here?
react/packages/react-dom/src/server/ReactDOMServerFormatConfig.js
Lines 99 to 105 in cdb8a1d