Creating a Store
https://frontendmasters.com/courses/intermediate-react-v2/creating-a-store/
Create a redux store
// **** store.js ****
import { createStore } from "redux";
import reducer from "./reducers";
const store = createStore(
reducer,
// this is just for using
// React devtools
// if React devtools exist, use them
// otherwise just give a "bogus" function (`f => f`)
typeof window === "object" &&
typeof window.__REDUX_DEVTOOLS_EXTENSION__ !== "undefined"
? window.__REDUX_DEVTOOLS_EXTENSION__()
: f => f
);
export default store;