Closed
Description
What is the location of your example repository?
No response
Which package or tool is having this issue?
hydrogen-react
What version of that package or tool are you using?
2024.10.0
What version of Remix are you using?
2.15.0
Steps to Reproduce
- Wrap the root's layout with
ShopifyProvider
andCartProvider
from@shopify/hydrogen-react
- Run
npm run dev
and observe warning in terminal
Expected Behavior
Expected behavior is that there is no SSR warning in the terminal.
Actual Behavior
Actual behavior is this warning in the terminal every time the server loads or reloads:
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
at CartProvider (/Users/...)
at ShopifyProvider (/Users/..)
...