Public
Like
1
react-router-ssr-starter
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
http.tsx
https://jxnblk--591d77e41fb711f0a58c569c3dd06744.web.val.run
Minimal React Router starter example with server-side rendering for Val Town
The http.tsx
file is the main server that responds with an HTML stream, using React Router's StaticRouter
component.
The HTML includes a <script type="module">
tag that loads the client.tsx
file to hydrate the app
with client-side routing provided by React Router's BrowserRouter
in declarative mode.