Closed KyleJune closed 2 years ago
It looks like react 18 will be released in 1-3 weeks. I'm not sure if renderToPipeableStream will work with Deno, investigate that before switching to using it instead of renderToString. If it doesn't, renderToString will use the fallback. Until react 18 is released, I will need to use my isServer() function and conditionally use the fallback or suspense element depending on if rendering on the server.
https://github.com/reactwg/react-18/discussions/37
For this, I'd like to add a utils.ts file with functions for checking if using server or browser rendering to determine whether or not a component is rendered on the server or on the client only.