You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using next.js to generate a website and it uses SSR to render the pages beforehand. However, as expected the localstorage doesn't match when hydrating the DOM. Moreover, it throws since window is not defined in the server setting
The text was updated successfully, but these errors were encountered:
Check window existence is a solution only for localStorage and sessionStorage but the hook works with any storage that implements Storage interface and it's not always something that's in the window and as you said this would enforce everything rendering twice
It should be the Storage level solution and it seems like there is a solution to make the first rendering happen with an initial value, give me time to think about it
I'm currently using next.js to generate a website and it uses SSR to render the pages beforehand. However, as expected the localstorage doesn't match when hydrating the DOM. Moreover, it throws since
window
is not defined in the server settingThe text was updated successfully, but these errors were encountered: