From the course: Building Modern Projects with React
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Solution: Adding a Redux flow
From the course: Building Modern Projects with React
Solution: Adding a Redux flow
- Okay I'm going to show you how I solve this challenge. Keep in mind that the code I'm going to write in this video will continue to be a part of this project, so if you did yours a little differently, you might want to rewrite it to make it more similar to mine or just keep in mind that things like variable names in your project might be a little different going forward. So with that in mind, I followed a very similar flow as what we used for removing and creating new todos. I started off with actions.js, and I added a new action at the bottom, I stated off by creating an action type, I said export const, mark todo as completed, and set that equal to a string, mark todo as completed. And then I made the action creater. Export const, mark todo as completed, and I made that take the text of the todo that we wanted to mark as completed as an argument. So text, and then that's going to return an action with the type.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Why do you need Redux?4m 11s
-
(Locked)
How does Redux work?4m 35s
-
(Locked)
Adding Redux to a React app3m 24s
-
(Locked)
Creating Redux actions4m 16s
-
(Locked)
Creating reducers6m 23s
-
(Locked)
Connecting components to the store7m 1s
-
(Locked)
Running a React-Redux application4m 32s
-
(Locked)
Persisting the Redux store6m 43s
-
(Locked)
Redux DevTools3m 34s
-
(Locked)
Redux best practices3m 53s
-
(Locked)
Challenge: Adding a Redux flow1m 56s
-
(Locked)
Solution: Adding a Redux flow4m 14s
-
-
-
-
-
-