Redux Grout
Redux middleware, actions, and reducers for Grout.
Documentation
Middleware
;; // Combined reducers;; let groutMiddleware = ;const createStoreWithMiddleware = createStore;
Reducers
Add reducers to combineReducers function:
;;;const account files entities = Reducers;const rootReducer = ; ;
Actions
Example of using Actions from redux-grout
in a smart component:
;;;; { superprops; thisonLoginClick = thisonLoginClick; } { e; let testLogin = username: 'test' password: 'asdfasdf'; thisprops; } { return <div className="App"> <button onClick= thisonLoginClick >Login</button> </div> }//Place state of redux store into props of component { return account: stateaccount ;}//Place action methods into props { return ;} mapStateToProps mapDispatchToPropsMain;