Setting up the Store

Using our knowledge from the previous chapter, we'll set up the store for our app, along with our render and store.subscribe functions.

We'll cover the following

Let’s quickly go over the process of setting up the store of the App, so that we can retrieve the data required to build the list of users within the sidebar.

One of the first steps when creating a Redux app is setting up the Redux store. Since this is where data will be read from, it becomes imperative to resolve this.

So, please install redux from the cli with:

yarn add redux

Once the installation is done, create a new folder called store and in the directory, create a new index.js file.

Don’t forget the analogy of having the major Redux actors in their own directory.

Like you already know, the store will be created via the createStore factory function from redux like this:

store/index.js:

Get hands-on with 1200+ tech skills courses.