sovereign-intelligence
Front door to Drake Stapleton's sovereign stack.
Brought by drakestapleton
sovereign-intelligence / docs / archive / drakestapleton.com-old / src / entry-server.tsx
| 1 | import { renderToString } from "react-dom/server"; |
| 2 | import { StaticRouter } from "react-router-dom"; |
| 3 | import { App } from "./App"; |
| 4 | |
| 5 | export function render(url: string) { |
| 6 | return renderToString( |
| 7 | <StaticRouter location={url}> |
| 8 | <App /> |
| 9 | </StaticRouter> |
| 10 | ); |
| 11 | } |