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

Feature: State Management - Create a Reducer for Icecream #51

Closed
6 tasks done
larkinds opened this issue Sep 11, 2023 · 0 comments
Closed
6 tasks done

Feature: State Management - Create a Reducer for Icecream #51

larkinds opened this issue Sep 11, 2023 · 0 comments

Comments

@larkinds
Copy link
Owner

larkinds commented Sep 11, 2023

Overview:
When a user adds an icecream to the cart in the Single Product Page or the Hall of Fame Page, that data should be reflected in the cart and eventually checkout. When a user edits the quantity of their selection in the cart, or deletes an item altogether, that should be reflected in the rest of the cart page. Upon navigating to checkout, all changes along the way should be reflected.

Action:

  • Create an icecream reducer, and import it into the highest level of the app (main.tsx)
    • The reducer should have the capability add an icecream flavor to state (of the reducer)
    • The reducer should have the capability edit the amount of an icecream flavor in state (of the reducer)
    • The reducer should have the capability to delete an icecream flavor from state (of the reducer)
  • Pass the reducer’s state and dispatch methods to the component’s that need access (single-product page, cart, checkout)
  • Write documentation on the reducer’s actions & how to use them in Notion

Resources:
React's Guide to Reducer

@larkinds larkinds changed the title State Management - Create a Reducer for Icecream Feature: State Management - Create a Reducer for Icecream Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants