- in this app an expense contains the following properties
id
a uuidcategoryID
an id that corresponds to an existing categorytimestamp
a date from when the category was createdname
a string that is the name of the categoryprice
a number that is the total amount of $ in the category
- exports a reducer that holds the entire app state from
reducer/index.js
- creates a reducer that will combine your categories reducer and expenses reducer
- creates a category reducer in your your reducer directory
- this reducer supports the following interactions
EXPENSE_CREATE
-- stores an expenseEXPENSE_UPDATE
-- updates an existing expenseEXPENSE_DELETE
-- deletes an existing expense
components and structure as per below diagram.
App
Provider
BrowserRouter
Route / Dashboard
CategoryForm -- for creating categories
[CategoryItem] -- list of CategoryItems
CategoryForm -- for updating categories
ExpenseForm -- for creating expenses
[ExpenseItem] -- list of ExpenseItems
ExpenseForm -- for updating an expense
- delete button from expense item deletes the expense from the Apps
onClick
- displays the
name
andprice
of the component - displays an ExpenseForm that will enable the user to update the expense in the app state
- Tested all of action creators
- Tested each reducer used in combineReducers