Hey there, I was just able to make the router work with ssr in a basic example.
From what I figured, its just about providing your own integration in the server part of the app/router rendering.
For me the integration looks like:
const ssrIntegration = createIntegration(
() => req.normalisedPath(),
() => undefined
);
You will find the full example here: https://gitlab.com/BeneStem/es4x-flower/-/blob/master/src/server/ServerRouter.tsx#L22
Its probably a nice hint for other people to add this to the documentation.
I saw in you todos, that ssr is still not supported completely.
But if you'd go further it would probably be nice to set the current url directly as a prop like for example the vue ssr router is doing it. A full integration with history is probably not even needed on the initial ssr part.
What do you say about that? :)
Hey there, I was just able to make the router work with ssr in a basic example.
From what I figured, its just about providing your own
integrationin the server part of the app/router rendering.For me the integration looks like:
You will find the full example here: https://gitlab.com/BeneStem/es4x-flower/-/blob/master/src/server/ServerRouter.tsx#L22
Its probably a nice hint for other people to add this to the documentation.
I saw in you todos, that ssr is still not supported completely.
But if you'd go further it would probably be nice to set the current url directly as a prop like for example the vue ssr router is doing it. A full integration with history is probably not even needed on the initial ssr part.
What do you say about that? :)