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

Fix Nuxt SSR hydration issue #2

Open
shanejearley opened this issue Jan 3, 2022 · 0 comments
Open

Fix Nuxt SSR hydration issue #2

shanejearley opened this issue Jan 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@shanejearley
Copy link
Contributor

Nuxt provides useState composable to create a reactive and SSR-friendly shared state across components. In other words, it's an SSR-friendly ref replacement. But there seems to be an issue with our implementation of it... and we end up with two copies of our Nuxt page slot displaying in the browser at once, one from the server and one from the client.

We need to isolate this issue by doing a few things first:

  • Remove the current workaround code, which is the client-only tag wrapped around the slot tag in ./layouts/default.vue
  • Remove template bindings and add them back incrementally to see which piece of code breaks the app's state and creates both the server and client to render

**Note: ** It should be related to trying to modify our composable state in the template in a way that makes Nuxt break.

@shanejearley shanejearley added the bug Something isn't working label Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant