Skip to content

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.

1 participant