From the course: React: Server-Side Rendering

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add Redux actions

Add Redux actions - React.js Tutorial

From the course: React: Server-Side Rendering

Start my 1-month free trial

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…

Contents