Created
March 13, 2017 14:09
-
-
Save diegocasmo/c4607c2fc8c8eae819dd6794b3db8c79 to your computer and use it in GitHub Desktop.
Example definition of a Redux store using a custom middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createStore, combineReducers, applyMiddleware} from 'redux' | |
import {redirectMiddleware} from '../middleware/redirect_middleware'; | |
let todoApp = combineReducers(reducers); | |
let store = createStore( | |
todoApp, | |
applyMiddleware(redirectMiddleware) // Apply redirect middleware | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See full blogpost 'Navigation Redirects Through Redux Middleware'