Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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