From the course: Create a CRM Mobile Application with React Native

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

React Native actions

React Native actions

- [Instructor] So let's continue working on the initial setup for Redux. The one thing that we need to do now is to make sure that we can get some data inside of our application, otherwise our application's not going to show anything and it will break. So right now, if you run the application, you're going to get errors like this. So, what we want to do is get to bare state where we have data inside of our application and we can load some people inside of our CRM. So what we're going to do first is go back to our reducers right here and start working on this. So the first thing we're going to need to do is create the initial state. So let's go ahead and do that: initialState. And our initial state will include an object with a bunch of stuff that we're going to add to it as we have actions and our reducers are reducing that state with a new state. And this is why I love the legacy way of doing Redux, because the logic is there, the actions tells you what's going to happen next, and…

Contents