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 Toppings #52

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

Feature: State Management - Create a Reducer for Toppings #52

larkinds opened this issue Sep 11, 2023 · 0 comments

Comments

@larkinds
Copy link
Owner

larkinds commented Sep 11, 2023

Overview
When a user adds a topping 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 a topping’s reducer, and import it into the highest level of the app (main.tsx)
    • The reducer should have the capability add a topping to state (of the reducer)
    • The reducer should have the capability edit the amount of a topping in state (of the reducer)
    • The reducer should have the capability to delete a topping 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 useReducer

@larkinds larkinds changed the title State Management - Create a Reducer for Toppings Feature: State Management - Create a Reducer for Toppings 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

4 participants