Last active
May 26, 2019 15:39
-
-
Save rafaelrozon/83ccd86f1e2a77a839ad89b287f0f739 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
// src/state/middlewares/composeEnhancers.js | |
import { composeWithDevTools } from 'redux-devtools-extension'; | |
import { compose } from 'redux'; | |
let composeEnhancers = compose; | |
if (process.env.NODE_ENV === 'development') { | |
composeEnhancers = composeWithDevTools | |
} | |
export default composeEnhancers; | |
// src/state/middlewares/index.js | |
import { applyMiddleware } from 'redux' | |
import thunk from 'redux-thunk'; | |
import composeEnhancer from './composeEnhancer'; | |
export default composeEnhancer( | |
applyMiddleware( | |
thunk | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment