Skip to content

Refactor cart store to use useAsyncQuery and improve mutations #1516

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

Merged
merged 3 commits into from
Jul 3, 2025

Conversation

w3bdesign
Copy link
Owner

Replaces manual cart fetching with useAsyncQuery for better reactivity and error handling. Refactors add, update, and clear cart actions to use dedicated mutation instances, consolidates loading state, and improves cart clearing logic for immediate UI updates. Removes unused variables and streamlines error handling.

Replaces manual cart fetching with useAsyncQuery for better reactivity and error handling. Refactors add, update, and clear cart actions to use dedicated mutation instances, consolidates loading state, and improves cart clearing logic for immediate UI updates. Removes unused variables and streamlines error handling.
@w3bdesign w3bdesign self-assigned this Jul 3, 2025
Copy link

vercel bot commented Jul 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxtjs-woocommerce ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 6:38pm

The cartUpdater plugin no longer fetches the cart asynchronously during initialization. It now simply initializes the cart store by calling useCart().
Simplified the isLastItem assignment in removeProductFromCart and improved formatting for the loading computed property for better readability.
Copy link

sonarqubecloud bot commented Jul 3, 2025

@w3bdesign w3bdesign merged commit c737efe into master Jul 3, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

1 participant