Skip to content

Instantly share code, notes, and snippets.

@diegocasmo
Created March 13, 2017 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegocasmo/c4607c2fc8c8eae819dd6794b3db8c79 to your computer and use it in GitHub Desktop.
Save diegocasmo/c4607c2fc8c8eae819dd6794b3db8c79 to your computer and use it in GitHub Desktop.
Example definition of a Redux store using a custom middleware
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
);
@diegocasmo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment