Step 2.6: Redux: React Binding (Exercise)
If you haven't arStart the app by running npm start from the root of the frontend-bootcamp folder. Click the "exercise" link under day 2 step 6 to see results.
At the beginning of this exercise, the "Add" and "Clear Completed" buttons do not work. We'll be fixing that in this step!
-
Open
exercise/src/index.tsxand wrap<TodoApp>with<Provider>as instructed in the comment -
Open
exercise/src/components/TodoFooter.tsxand erase the "nullable" type modifier (i.e. the ?) in the interface definition ofTodoFooterProps -
Uncomment the bottom bits of code and fill in
connect()arguments - feel free to useTodoListItem.tsxas a guide -
Repeat steps 2, 3 for the
TodoHeader.tsxfile
Bonus exercise
For further reading, go here to learn more about the mergeProps and options parameters to connect():