Hello, i'm quite new to this library but i have a bit of a problem here to implement renderToStream within deno. When i call renderToStream and pass in the element with option disable: false I get the error that it fails to import renderToPipeableStream from react-dom/server.
currently this is my main.tsx:
/** @jsx h */
/** @jsxFrag Fragment */
import { Application } from "https://deno.land/x/oak@v12.4.0/mod.ts";
import { App } from "./src/App.tsx";
import { h } from "https://deno.land/x/jsx@v0.1.5/mod.ts";
import { renderToStream } from "npm:react-streaming/server";
const app = new Application();
app.use(async (ctx) => {
const {
readable
} = await renderToStream(<App />, {
disable: true
});
ctx.response.body = readable;
});
await app.listen({ port: 8000 });
the app component looks like this:
/** @jsx h */
import { h } from "https://deno.land/x/jsx@v0.1.5/mod.ts";
export function App() {
return <div>
Hello world
</div>;
}
Hello, i'm quite new to this library but i have a bit of a problem here to implement
renderToStream
within deno. When i callrenderToStream
and pass in theelement
with optiondisable: false
I get the error that it fails to importrenderToPipeableStream
fromreact-dom/server
.currently this is my main.tsx:
the app component looks like this: