-
Notifications
You must be signed in to change notification settings - Fork 243
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsitent cart items when using browser's back and forward navigation #1691
Comments
Hi @pkubwiraBixlers sorry about the late reply. The behaviour you are seeing is because pages (including /cart) are server rendered. We are playing with some idea of how to make this feel less broken, but it does always come with some performance trade off. Is there any reason why you need to use the /cart route specially? Your end user should mostly be un-aware of the /cart route unelss they have JS disabled & the user clicks on cart. By default Hydrogen uses the cart side drawer. |
What is the location of your example repository?
https://hydrogen.shop/cart (shopify hydrogen demo store)
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
Not sure
What version of Remix are you using?
Not sure
Steps to Reproduce
when you add an item to the bag and go to the "/cart" route and remove the item from cart (the number of items in the cart is 0) if you use the browser's navigation button to go back to the whatever page you were on before and then use the browser to go forward (going back to the cart route) the item you previously deleted will be there and you can repeat this process indefinitely.
Expected Behavior
the removed item should not be back in the cart when you use the browser to forward navigate back to the cart becaude it had already been removed.
Actual Behavior
item comes back in the cart after having been removed
The text was updated successfully, but these errors were encountered: