diff --git a/step2-07/README.md b/step2-07/README.md index 4858c7a..aa8c2dd 100644 --- a/step2-07/README.md +++ b/step2-07/README.md @@ -18,6 +18,8 @@ This `mapStateToProps` function selects out portions of the state tree. This fun 2. open up `exercise/src/components/TodoFooter.tsx` and erase the "nullable" type modifier (i.e. the ?) in the interface definition of `TodoFooterProps` -3. uncomment the bottom bits of code and fill in the implementation for `mapStateToProps()` and `mapDispatchToProps()` - feel free to use `TodoListItem.tsx` as a guide +3. Remove the `export` from `export const TodoFooter = (props: TodoFooterProps) => {` -4. do steps 2 and 3 for the `TodoHeader.tsx` file +4. uncomment the bottom bits of code and fill in the implementation for `mapStateToProps()` and `mapDispatchToProps()` - feel free to use `TodoListItem.tsx` as a guide + +5. do steps 2, 3, and 4 for the `TodoHeader.tsx` file diff --git a/step2-08/README.md b/step2-08/README.md index 0fc7f74..6796993 100644 --- a/step2-08/README.md +++ b/step2-08/README.md @@ -43,11 +43,7 @@ export const reducer = combineReducers({ }); ``` -# Take a peek at useful helpers and middleware created by community are: - -- immer: https://github.com/mweststrate/immer - improves ergonomics of working with immutables by introducing the concept of mutating a draft - -- redux-starter-kit: https://github.com/reduxjs/redux-starter-kit - help address common concerns of Redux in boilerplate and complexity +`combineReducers` handles the grunt-work of sending *actions* to each combined reducer. Therefore, when an action arrives, each reducer is given the opportunity to modify its own state tree based on the incoming action. # Exercise @@ -68,3 +64,9 @@ The Redux team came up with `redux-starter-kit` to address a lot of boilerplate 3. run `npm test` in the root folder to see if it still works! 4. look at the web app to make sure it still works! + +# Further reading + +- immer: https://github.com/mweststrate/immer - improves ergonomics of working with immutables by introducing the concept of mutating a draft + +- redux-starter-kit: https://github.com/reduxjs/redux-starter-kit - help address common concerns of Redux in boilerplate and complexity