- Install modules to work add redux to a react application
- Create a redux store and connect it to react
- Create a reducer
- Create an action
- Explain the flow of information and actions of react and redux
- Install the following node modules
redux
react-redux
- Create
src/reducer.js
fileimport { combineReducers } from redux
export default combineReducer({})
- In
src/index.js
import { createStore } from 'redux'
import { Provider } from 'react-redux'
- Create store
- Add store to the React Application
- In
src/reducer.js
- Create reducer
- Add new reducer to
combineReducer
- In
App.js
- Replace class component with a functional component
- import { connect } from 'react-redux'
- Create
mapStateToProps
- connect component
- create render
- Create
src/actions.js
file- Create
action creator
- import action creator to
App.js
- trigger action creator
- Create
- With your tables, explain how data flow from a reducer to a component
- With your groups, explain how the state can be updated
- Replicate the To Do application using Redux
- Update To Do application to use Redux