Skip to content

Instantly share code, notes, and snippets.

@sathinduga
Created September 9, 2018 15:17
Show Gist options
  • Save sathinduga/ee48e6a25118250560a61e8a669dda9c to your computer and use it in GitHub Desktop.
Save sathinduga/ee48e6a25118250560a61e8a669dda9c to your computer and use it in GitHub Desktop.
Debug Integration
import { createStore, combineReducers, compose } from 'redux';
import counterReducer from './reducers/counter_reducer';
const rootReducer = combineReducers({
counter: counterReducer,
});
let composeEnhancers = compose;
if(__DEV__){
composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
}
const configStore = () => {
return createStore(rootReducer, composeEnhancers());
};
export default configStore;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment