react.dev
react.dev copied to clipboard
[Bug]: `importMap` option on `renderTo{Pipeable|Readable}Stream` is undocumented
Summary
importMap option is not documented on either page for renderToPipeableStream nor renderToReadableStream
Page
https://react.dev/reference/react-dom/server/renderToReadableStream
Details
After spending a decent amount of time trying to figure out how to inject an importMap when server rendering within React, I finally stumbled across the fixtures which showcase using the importMap option. I have found no reference to this option on the current docs.
import React from 'react'; import { renderToPipeableStream } from 'react-dom/server';
const App = () => (
const stream = renderToPipeableStream(<App />, { // Your options here importMap: {/* your import map configuration */} });
// Handle the stream as needed
@TUNISIA-user - yea thats the API, however I haven't found it documented anywhere