Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: importMap option on renderTo{Pipeable|Readable}Stream is undocumented #7119

Open
hamlim opened this issue Aug 20, 2024 · 3 comments
Open

Comments

@hamlim
Copy link

hamlim commented Aug 20, 2024

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.

@TUNISIA-user
Copy link

TUNISIA-user commented Aug 20, 2024

import React from 'react';
import { renderToPipeableStream } from 'react-dom/server';

const App = () => (

Hello, world!
);

const stream = renderToPipeableStream(, {
// Your options here
importMap: {/* your import map configuration */}
});

// Handle the stream as needed

@hamlim
Copy link
Author

hamlim commented Aug 20, 2024

@TUNISIA-user - yea thats the API, however I haven't found it documented anywhere

@TUNISIA-user
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants