If you use the `bootstrapScriptContent` option of `renderToPipeableStream()` to provide hydration data (as [recommended in the <script> upgrade guide](https://github.com/reactwg/react-18/discussions/114)) 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?

https://github.com/facebook/react/blob/cdb8a1d19d0c0d43a72c3f0fe739b04da247c360/packages/react-dom/src/server/ReactDOMServerFormatConfig.js#L99-L105
expect(Scheduler).toFlushUntilNextPaint(['server']);
      expect(getVisibleChildren(container)).toEqual(<div>server</div>);
      
      expect(ref.current).toEqual(serverRenderedDiv);
      
      
      expect(Scheduler).toFlushUntilNextPaint(['client']);
      expect(getVisibleChildren(container)).toEqual(<div>client</div>);
      expect(ref.current).toEqual(serverRenderedDiv);
    }
  });
  
  
  it('calls getServerSnapshot instead of getSnapshot (with selector and isEqual)', async () => {
    
    
    const ref = React.createRef();
    function getServerSnapshot() {
      return {env: 'server', other: 'unrelated'};
    }
    function getClientSnapshot() {
      return {env: 'client', other: 'unrelated'};
    }
    function selector({env}) {
      return {env};
    }
    function isEqual(a, b) {
      return a.env === b.env;
    }
    function subscribe() {