February 2019
Intermediate to advanced
204 pages
4h 52m
English
Since we know what a store is in Redux, let's get started with creating a store file. We can keep our store in a separate file. Let's call it configureStore.js:
import { createStore, applyMiddleware, compose } from "redux";import createReducer from "./reducers";export default function configureStore(initialState = {}, history) { const store = createStore( createReducer(), ); // Extensions store.injectedReducers = {}; // Reducer registry return store;}
Read now
Unlock full access