Created
March 15, 2019 10:29
-
-
Save akmur/fa3fc58372418b0af19c2695a22b594d 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
// importing basic redux packages | |
import { createStore, applyMiddleware, compose } from 'redux' | |
// importing our combined reducers | |
import combineReducers from '../reducers/index.reducers' | |
// importing our middleware | |
import { middlewareActions } from '../middleware/index.middleware' | |
// this is needed to be able to do ajax requests | |
import thunk from 'redux-thunk' | |
// the following line is used for the redux devtools chrome extension | |
const storeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose | |
// creating the store | |
const store = createStore( | |
combineReducers, | |
storeEnhancers(applyMiddleware(middlewareActions, thunk)) | |
) | |
// exporting the store | |
export default store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment