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

setCartItems only updates on second click of add to cart button, with the previous product and quantity #86

Open
uc129 opened this issue Dec 12, 2022 · 0 comments

Comments

@uc129
Copy link

uc129 commented Dec 12, 2022

Hi Adrian, I am having an issue with the onAdd function, where the setCartItems only updates on the second click of the add to cart button. I have asked the question on StackOverflow and the link is below.
If you have any insights please, can you help? And also, thank you for all the amazing work that you are doing.

console logs of updating the state
Screen Shot 2022-12-12 at 2 39 20 pm

Thank You.
Question with details on stack overflow-

@uc129 uc129 changed the title setCartItems only updates when setCartItems only updates on second click of add to cart button, with the previous product and quantity Dec 12, 2022
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

1 participant