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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cart takes time to show cart item after clicking add to cart button #1038

Closed
RohitDeshwal opened this issue Jun 26, 2023 · 1 comment
Closed

Comments

@RohitDeshwal
Copy link

What is the location of your example repository?

cart takes time to load product after clicking add to card button in hydrogen remix

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2023.1.5

What version of Remix are you using?

No response

Steps to Reproduce

Visit the web page or application where the cart functionality is available.
Navigate to a product or item that you intend to add to the cart.
Click on the "Add to Cart" button associated with the selected product.
Observe the cart section or area where the selected products should be displayed.

Expected Behavior

After clicking on the "Add to Cart" button, a loading indicator should be displayed in the cart section, indicating that the system is processing the request and fetching the required data.

Actual Behavior

Upon clicking the "Add to Cart" button, I have noticed a significant delay in loading the products into the cart. Additionally, there is no loading indicator displayed during this process, leading to confusion and uncertainty for users.

@blittle
Copy link
Contributor

blittle commented Jun 21, 2024

Resolved with the new useOptimisticCart hook: https://shopify.dev/docs/api/hydrogen/2024-04/hooks/useoptimisticcart

@blittle blittle closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants