Last active
July 12, 2016 10:21
-
-
Save lithin/c0e3ff1cd077307d77bb4504b6f1c11d to your computer and use it in GitHub Desktop.
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 createLogger from 'redux-mori/dist/createLogger'; | |
import { createStore } from 'redux-mori'; | |
import { applyMiddleware } from 'redux'; | |
const middlewares = []; | |
if (isDev) { | |
// you can extend logger options as usual but don’t have to | |
const logger = createLogger({ | |
predicate: (getState, action) => !/EFFECT_/.test(action.type), | |
}); | |
middlewares.push(logger); | |
} | |
const store = createStore(rootReducer, applyMiddleware(...middlewares)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment