Skip to content

Fix router hydration #4209

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented May 27, 2025

This PR serializes the initial server router state for the client to fix some hydration issues. This helps with some client-side only navigator properties like can_go_back and fixes 404 routes in SSG where the server rendered URL and client url are different

Fixes #4047
Fixes #3644

@ealmloff ealmloff added bug Something isn't working fullstack related to the fullstack crate labels May 27, 2025
@ealmloff ealmloff changed the title Fix can go back hydration Fix router hydration May 27, 2025
@ealmloff ealmloff marked this pull request as ready for review May 27, 2025 16:58
@ealmloff ealmloff requested a review from a team as a code owner May 27, 2025 16:58
@ealmloff
Copy link
Member Author

This PR works when serving with the version of the CLI in #4111. Unforunately both serving SSG and bundling are currently broken in the git and alpha version of the CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fullstack related to the fullstack crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

navigator.can_go_back() fails to hydrate With SSG, fallback / 404 route does not seem to work?
1 participant