September 2018
Intermediate to advanced
764 pages
20h 6m
English
As mentioned previously, the entire state of the application is stored as a single object inside a construct called the store. The store is central to a Redux application, so let’s create it. Inside src/index.jsx, add the following lines:
import { createStore } from 'redux'; const initialState = {}; const reducer = function (state = initialState, action) { return state; } const store = createStore(reducer, initialState);
The createStore method accepts three parameters:
Read now
Unlock full access