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(gotcha): Add an entry about hydration warnings #2682

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

machour
Copy link
Collaborator

@machour machour commented Apr 7, 2022

Closes: #1077

  • Docs
  • Tests

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kentcdodds kentcdodds merged commit ba63eeb into remix-run:main Apr 7, 2022
@machour machour deleted the docs/browser-extensions branch April 7, 2022 15:36
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2022

🤖 Hello there,

We just published version v1.3.5 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

XiNiHa pushed a commit to XiNiHa/remix that referenced this pull request Apr 8, 2022
@msakrejda
Copy link
Contributor

What is this documentation actually telling us? To always browse in incognito mode (and have our users do so)? That's obviously not a solution, so I don't understand what this is suggesting. Never mind that extensions can be enabled in incognito mode. To not uninstall extensions that cause this problem? That's impractical for developers and impossible to require of end-users.

I'd like to suggest better guidance here (I ran across this myself), but I don't feel like I understand the intent behind this note.

@machour
Copy link
Collaborator Author

machour commented Nov 4, 2022

@msakrejda You are making a totally fair point here. I'll look into expanding the documentation here to provide a better explanation and guidance 👍🏼

@sergiodxa
Copy link
Member

@machour it would be better to explain what React does when that happens, because I think most people think React will fail completely, when the reality is that React will do a new render as if you didn’t SSR-ed your app, instead of just attaching event listener like the normal hydration process.

@machour
Copy link
Collaborator Author

machour commented Nov 4, 2022

@sergiodxa a couple questions here 🙏🏼

  • is what you're saying true for both React 17 et React 18 ?
  • is the warning logged in production, or is it only for dev mode ?
  • when react fails at hydrating, and does the new render, will Remix call loaders / actions again, or does it already have the data in the SSR response ?

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

Successfully merging this pull request may close these issues.

[Docs]: Did not expect server HTML to contain a <script> in <html>
4 participants