-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Update remix example to restore from error pages #30592
Conversation
// reset cache to reapply global styles | ||
clientStyleData.reset(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to run only once, the effect it's basically what is changing the emotionCache
, so we cannot add those in the dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Great!
Helps a lot implementing the solution! |
Closes #30436
Based on #30436 (comment) with small adjustments to avoid double rendering.
Credits go to @lvauvillier for the initial implementation.