Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs]: SSR in >= 6.4? (Documentation outdated) #9825

Closed
xriter opened this issue Jan 6, 2023 · 5 comments · Fixed by #10254
Closed

[Docs]: SSR in >= 6.4? (Documentation outdated) #9825

xriter opened this issue Jan 6, 2023 · 5 comments · Fixed by #10254
Assignees
Labels

Comments

@xriter
Copy link

xriter commented Jan 6, 2023

What is the new or updated feature that you are suggesting?

Is or will it be possible to still Server Side Render in React Router >= 6.4?

The documentation seems to be outdated at this moment (https://reactrouter.com/en/main/guides/ssr).
The new RouterProvider/Router object does not seem to be compatible with the older 'StaticRouter'.

Why should this feature be included?

Not all the features of Remix might be needed, but it would still be nice to do a simple SSR, like we could in version <= 6.3.

@xriter xriter added the feature label Jan 6, 2023
@xriter xriter changed the title [Feature]: SSR in 6.4? [Feature]: SSR in >= 6.4? Jan 6, 2023
@xriter xriter changed the title [Feature]: SSR in >= 6.4? SSR in >= 6.4? (Documentation outdated) Jan 6, 2023
@b3nten
Copy link

b3nten commented Jan 6, 2023

Some guidence on this would be helpful!

@brophdawg11
Copy link
Contributor

Yeah we need to get the docs updated for the new SSR APIs - but for now feel free to check out the source code in this example using the new Data APIs. The README there also looks slightly outdated as we renamed a few things.

@brophdawg11 brophdawg11 added docs and removed feature labels Jan 9, 2023
@brophdawg11 brophdawg11 changed the title SSR in >= 6.4? (Documentation outdated) [Docs]: SSR in >= 6.4? (Documentation outdated) Jan 9, 2023
@felixcatto
Copy link

felixcatto commented Mar 17, 2023

Yep, some simple example would be helpful. With old <StaticRouter location={req.url}>, all you need to make SSR is provide url from request.

But now we have two additional entities createStaticHandler, createStaticRouter and StaticRouterProvider also wants some context. Where i can get it? Example in link looks incredibly complex compare to old StaticRouter way 😢

@brophdawg11 brophdawg11 self-assigned this Mar 17, 2023
@welkinwong

This comment was marked as duplicate.

@brophdawg11
Copy link
Contributor

SSR docs are now updated for data routers: https://reactrouter.com/en/main/guides/ssr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants