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

[fix] Loader state for all 3 types of cards #28

Open
Hamdrive opened this issue Apr 17, 2022 · 0 comments
Open

[fix] Loader state for all 3 types of cards #28

Hamdrive opened this issue Apr 17, 2022 · 0 comments

Comments

@Hamdrive
Copy link
Owner

Noticed that the current implementation of loader state for all 3 cards (Product, Wishlist and Cart) are using the same shared context state,

  1. This firstly might go against the concept of a global shared state with context
  2. This results in one API request triggering loader for all cards on the page

This issue is more apparent and visible on the cart page, when user tries to either remove the product or move to wishlist

Suggestions:

  1. Have separate state for all 3 cards, will result in repetitive states but each will be unique to only that card, ensuring each component is triggered does not affect other children
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