concept Redux store in category react
appears as: Redux store

This is an excerpt from Manning's book React in Action.
Action creators won’t do anything by themselves to change your app state (they just return objects). You need to use the dispatcher provided by Redux in order for the action creators to have any effect. The dispatch function is provided by the Redux store itself and will be the way you send actions into Redux to be handled. You’ll set up the Redux store next so you can use its dispatch function with your actions.
Listing 12.16. Modifying the Redux store for SSR (src/store/configureStore.prod.js)
//... let store; #1 export default function configureStore(initialState) { if (store && !isServer()) { return store; #1 } const hydratedState = !isServer() && process.env.NODE_ENV === 'production' #2 ? window.__INITIAL_STATE__ #2 : initialState; store = createStore( rootReducer, hydratedState, compose(applyMiddleware(thunk, crashReporting)) ); return store; } #1 If you’re on server, you want to return new store every time #2 If you’re not on server and app is in production mode, check DOM for state and use if possible !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":1,\"ch\":65},{\"line\":1,\"ch\":67}],[{\"line\":4,\"ch\":65},{\"line\":4,\"ch\":67}],[{\"line\":18,\"ch\":0},{\"line\":18,\"ch\":2}],[{\"line\":1,\"ch\":65},{\"line\":1,\"ch\":67}],[{\"line\":4,\"ch\":65},{\"line\":4,\"ch\":67}],[{\"line\":18,\"ch\":0},{\"line\":18,\"ch\":2}],[{\"line\":7,\"ch\":65},{\"line\":7,\"ch\":67}],[{\"line\":8,\"ch\":65},{\"line\":8,\"ch\":67}],[{\"line\":19,\"ch\":0},{\"line\":19,\"ch\":2}],[{\"line\":7,\"ch\":65},{\"line\":7,\"ch\":67}],[{\"line\":8,\"ch\":65},{\"line\":8,\"ch\":67}],[{\"line\":19,\"ch\":0},{\"line\":19,\"ch\":2}]]"} !@%STYLE%@!

This is an excerpt from Manning's book Redux in Action.
Install and configure Redux Thunk. You’ll have to add middleware to the Redux store, which is simpler than it might sound.
To start, TasksPage will receive mock tasks from the top-level component, App. App will also be created using an ES6 class, because it will eventually connect to the Redux store, as shown in the following listing.
Listing 2.11. src/App.js: connecting components
import React, { Component } from 'react'; import { connect } from 'react-redux'; #1 import TasksPage from './components/TasksPage'; class App extends Component { render() { return ( <div className="main-content"> <TasksPage tasks={this.props.tasks} /> #2 </div> ); } } function mapStateToProps(state) { #3 return { tasks: state.tasks #4 } } export default connect(mapStateToProps)(App); #1 Adds connect to the list of imports #2 Tasks will be available via props after connected to the store. #3 The state argument is the entire contents of the Redux store, specifically the result of calling getState on the store instance. #4 The return value of mapStateToProps is passed into the App component as props, which is why render can reference this.props.tasks. !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":1,\"ch\":53},{\"line\":1,\"ch\":55}],[{\"line\":22,\"ch\":0},{\"line\":22,\"ch\":2}],[{\"line\":8,\"ch\":53},{\"line\":8,\"ch\":55}],[{\"line\":23,\"ch\":0},{\"line\":23,\"ch\":2}],[{\"line\":14,\"ch\":53},{\"line\":14,\"ch\":55}],[{\"line\":24,\"ch\":0},{\"line\":24,\"ch\":2}],[{\"line\":16,\"ch\":53},{\"line\":16,\"ch\":55}],[{\"line\":25,\"ch\":0},{\"line\":25,\"ch\":2}]]"} !@%STYLE%@!