Now that react-dom/server support data fetching and suspense as of react-dom@18, I was wondering how much work it would be to replace react-ssr-prepass and it turned out to be pretty blissful. So I'm writing this issue to share a cheeky drop-in replacement, I came by this repo earlier looking for such a thing so I figured I would provide it now that I figured it out:
import { renderToPipeableStream } from "react-dom/server";
await new Promise((onAllReady, onError) => renderToPipeableStream(<App />, { onAllReady, onError }));
Here's the diff in my app

Now that
react-dom/serversupport data fetching and suspense as ofreact-dom@18, I was wondering how much work it would be to replacereact-ssr-prepassand it turned out to be pretty blissful. So I'm writing this issue to share a cheeky drop-in replacement, I came by this repo earlier looking for such a thing so I figured I would provide it now that I figured it out:Here's the diff in my app
