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
- Navigate to CodeSandbox
- Switch to the
Console tab (Second tab next to Terminal in the bottom right dev tools)
- Click the + button a couple times so counter is !== 0
- Click preview reload button
- See warning in console

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
useEffecthook, 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
Consoletab (Second tab next toTerminalin the bottom right dev tools)