https://github.com/alchemy-adv-fullstack/adv-fullstack-reducer-demo/
Use this repository as a template to get started.
If viewing from Canvas: https://github.com/alchemy-adv-fullstack/adv-fullstack-reducer-shopping-deliverable/
- Use reducers to manage state.
- Manage objects immutably.
- Manage arrays immutably.
- Connect React events to reducer dispatches.
- Test reducers.
This is a retake on an old shopping list application. We need a means of:
- Adding shopping items to a shopping list.
- Editing the shopping items.
- Completing the shopping items.
- Deleting shopping items from the shopping list.
- CI must be passing (this includes linting and tests).
Task | Points |
---|---|
Use the useReducer hook to manage shopping list state |
2 |
Use the useContext hook to provide global state |
2 |
Use a switch statement inside of your reducer |
2 |
Use the dispatch function to update state |
2 |
Set an initial value for useReducer |
2 |
Items can be added to shopping list through a reducer | 2 |
Items can be edited in shopping list through a reducer | 2 |
Items can be deleted from shopping list through a reducer | 2 |
Unit Testing1 | 2 |
Deployed on netlify with CI passing | 2 |
Footnotes
-
Unit testing will include a unit test of reducers for adding to shopping list, deleting from shopping list, editing a shopping list item, and retrieving a shopping list of items โฉ