Skip to content

Commit

Permalink
Fix resend#868 by importing function correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-dickinson-sainsburys committed Sep 6, 2023
1 parent 18e4bae commit f3a0e37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/render/src/renderAsync.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { convert } from "html-to-text";
import pretty from "pretty";
import { type ReactNode } from "react";
import { renderToReadableStream, renderToStaticMarkup } from "react-dom/server";
import { renderToStaticMarkup } from "react-dom/server";
import ReactDOMServer from "react-dom/server";
import { type ReadableStream } from "node:stream/web";

export default async function renderToString(children: ReactNode) {
const renderToReadableStream = ReactDOMServer.renderToReadableStream;
const stream = await renderToReadableStream(children);

const html = await readableStreamToString(
Expand Down

0 comments on commit f3a0e37

Please sign in to comment.