Closed OpenGG closed 7 years ago
ah lame, reverted for now
@tj, any reason not to use
const enhancer = compose(
applyMiddleware(logger),
window.devToolsExtension ? window.devToolsExtension() : noop => noop
)
as provided in the documentation?
I am considering having helper to reduce it (in case we're using default config) like:
const enhancer = compose(
applyMiddleware(logger),
___REDUX_DEVTOOLS_EXTENSION___ || noop => noop
)
and also to have a babel plugin which would strip noop functions.
Without redux-devtools-extension,
window.devToolsExtension
will be undefined, which causescompose()
to throw an error:This issue is introduced by this pr 07e6658e3914ded8eb3249019cacc0e176e97b04 , reverting to 98101d5bcd1b0002ef2b3ec6b942582fd0895477 fixes it.
FYI,
compose()
src: https://github.com/reactjs/redux/blob/master/src/compose.js#L21