forked from Shopify/hydrogen-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CartProviderV2] Fix hydration errors (Shopify#2219)
* Cart goes through localStorage only once * Delay cart state changes until hydration finishes to avoid errors * Expose `CartProviderV2` in beta * Remove onLoad event check when using delayed state in CartProvider
- Loading branch information
1 parent
bc80acd
commit 34ffb8e
Showing
2 changed files
with
67 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@shopify/hydrogen': patch | ||
--- | ||
|
||
Experimental version of a new cart provider is ready for beta testing. | ||
`CartProviderV2` fixes race conditions with our current cart provider. After beta, `CartProviderV2` will become `CartProvider` requiring no code changes. | ||
|
||
To try this new cart provider: | ||
|
||
``` | ||
import {CartProviderV2} from '@shopify/hydrogen/experimental'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters