hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

Hydration errors when using `cart.get()` from context

Open vemundeldegard opened this issue 5 months ago • 2 comments

What is the location of your example repository?

Use Skeleton-template

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.7.7

What version of Remix are you using?

2.10.1

Steps to Reproduce

Use Skeleton-template or check any of the latest preview of Skeleton store. E.g. this preview from #2538

Hydration error occurs when adding an item to cart and refreshing the page. Image

Expected Behavior

There should not be any hydration errors and since the cart is server rendered, it should not fallback to 0 when the cart is not empty on the server.

Actual Behavior

Hydration errors occur when the cart is not empty. If cart is not empty it still shows as 0 before showing the cart total quantity count.

vemundeldegard avatar Sep 23 '24 17:09 vemundeldegard