Created
April 17, 2020 10:43
-
-
Save annguyenwasd/f8c7bfbdbfb3b11f0f44ff401bc5b0e9 to your computer and use it in GitHub Desktop.
This file contains 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 { compose, createStore as reduxCreateStore } from 'redux'; | |
const reducer = state => { | |
return state; | |
}; | |
const initialState = {}; | |
const windowGlobal = typeof window !== 'undefined' && window; | |
const devtools = | |
process.env.NODE_ENV === 'development' && windowGlobal.devToolsExtension | |
? window.__REDUX_DEVTOOLS_EXTENSION__ && | |
window.__REDUX_DEVTOOLS_EXTENSION__() | |
: f => f; | |
const createStore = () => | |
reduxCreateStore(reducer, initialState, compose(devtools)); | |
export default createStore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment