Sign in Go Pro

React Native with Redux

Combining Reducers and Defining Initial State

 
Autoplay

Up next

Previous

About

Redux state is determined by function called reducers. Those reducers are combined and provided to the store using a function called combineReducers.

You will use combineReducers to create a todos reducer, and add an array of todo items as the initial state

Summary of Content:

  • Create a new reducers folder, and put the root reducer there
  • Create a new todos reducer
  • Use combineReducers to put the todos reducer into the root store
  • Set the initial state of the todos reducer to an array of hardcoded todo items

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in React Native with Redux