Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SSP-2289] cart hydration fix #3142

Merged
merged 1 commit into from Apr 29, 2024
Merged

Conversation

sebaholesz
Copy link
Contributor

@sebaholesz sebaholesz commented Apr 29, 2024

Q A
Description, reason for the PR Cart hook (useCurrentCart) performed "hydration" for every place it was called from. This caused bugs and unexpected behavior. This PR makes the hydration state global, fixing this issue.
New feature No
BC breaks No
Fixes issues ...
Have you read and signed our License Agreement for contributions? Yes

馃寪 Live Preview:

- this is because previously, each useCurrentCart call
returned null cart initially, because it waited for its own hydration
- now it uses common hydration state, thus fixing this issue
@sebaholesz sebaholesz added the Bug Something isn't working label Apr 29, 2024
@sebaholesz sebaholesz self-assigned this Apr 29, 2024
@sebaholesz sebaholesz merged commit 4e1c1dc into 14.0 Apr 29, 2024
16 checks passed
@sebaholesz sebaholesz deleted the sh-ssp-2289-cart-hydration-fix branch April 29, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant