From the course: React: Server-Side Rendering
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Add Redux actions - React.js Tutorial
From the course: React: Server-Side Rendering
Add Redux actions
- [Narrator] A Redox Implementation requires actions. So basically actions are the functions that will be dispatched or called by the component and then execute the reducers to update the store. With the new data available for the application to feed from basically from the state. So let's work on this, so the first thing we're going to do is initialize our state inside of our store. So what I'm going to do here is create our initial state. And I'm going to, again, put a comment here so you can visualize what this is, and I'm going to create the new state with a variable start state. And this will be an object with cards which will be an array. So basically we'll pass the data into that in eventually. Okay. So now that we have our initial state let's create our actions. So actions are basically functions, and you're going to see this as we create them. So the first one, we're going to export a function…
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
-
-
-
-
(Locked)
Introducing Next.js with React9m 1s
-
(Locked)
Add initial components from template7m 59s
-
(Locked)
Add data for props5m 48s
-
(Locked)
Add Redux store and setup7m 1s
-
(Locked)
Add Redux actions4m 49s
-
(Locked)
Add Redux reducers7m 1s
-
(Locked)
Challenge: Why use Redux for SSR?24s
-
(Locked)
Solution: Why use Redux for SSR?48s
-
(Locked)
-
-
-