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

Disable hydration after full page load #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kedrzu
Copy link

@kedrzu kedrzu commented Sep 10, 2021

Some time ago I filled an issue #88

I found that an easy way to fix this is to disable the hydration once the page is fully loaded and all hydration is finished.
Once you complete the hydration any further navigation will happen in SPA mode, so no more hydration will ever occur.
Also, it may have some additional performance benefit, because we don't have to mount IntersectionObservers or idle callbacks when they are not needed anymore.

@@ -12,7 +10,5 @@ function resolveComponent(componentOrFactory) {
}

export function makeNonce({ component, hydrationPromise }) {
if (isServer) return component;
Copy link
Author

Choose a reason for hiding this comment

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

Because I check this in isHydrationDisabled it's not needed anymore.

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

Successfully merging this pull request may close these issues.

None yet

1 participant