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
We've had some folks run into this issue (dayhaysoos/use-shopping-cart#122) which seems to be a hydration warning because the server-side rendered value differs from the value on the client.
Have you seen that before by any chance? I did some digging, and the general recommendation is to use the same initial state as on the server, and then update it in a useEffect hook, but I'm not sure if that's possible within a custom hook 🤔
Hey, this module is great and we use it over at https://github.com/dayhaysoos/use-shopping-cart :) ❤️
We've had some folks run into this issue (dayhaysoos/use-shopping-cart#122) which seems to be a hydration warning because the server-side rendered value differs from the value on the client.
Have you seen that before by any chance? I did some digging, and the general recommendation is to use the same initial state as on the server, and then update it in a
useEffect
hook, but I'm not sure if that's possible within a custom hook 🤔Reproduction steps
I've set up an environment to reproduce: https://codesandbox.io/s/autumn-grass-vhu4e?expanddevtools=1&fontsize=14&hidenavigation=1&theme=dark
Console
tab (Second tab next toTerminal
in the bottom right dev tools)The text was updated successfully, but these errors were encountered: