Skip to content

Instantly share code, notes, and snippets.

@alexbeletsky
Created November 17, 2017 13:31
Show Gist options
  • Save alexbeletsky/fe6e2d8edadd00435a52d81702f2cab9 to your computer and use it in GitHub Desktop.
Save alexbeletsky/fe6e2d8edadd00435a52d81702f2cab9 to your computer and use it in GitHub Desktop.
import { createStore, applyMiddleware } from 'redux';
import { createAnalytics } from '../middleware';
const middlewares = [
thunk,
createLogger(),
createAnalytics({ host: 'ANALYTICS_HOST', token: 'ANALYTICS_TOKEN' })
];
const enchancer = applyMiddleware(...middlewares);
export default function configureStore(rootReducer, initialState) {
return createStore(rootReducer, initialState, enchancer)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment