Skip to content

Instantly share code, notes, and snippets.

@agoldis
Last active April 27, 2018 05:56
Show Gist options
  • Save agoldis/cfa9807ce796512b6534dab0507d535f to your computer and use it in GitHub Desktop.
Save agoldis/cfa9807ce796512b6534dab0507d535f to your computer and use it in GitHub Desktop.
redux - full example
import { createStore, applyMiddleware, compose } from "redux";
import { initialState } from "./initialState";
import { reducer } from "./reducer";
import { enhanceStore } from "./storeEnhancer";
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
export const store = createStore(
reducer,
initialState,
composeEnhancers(applyMiddleware(), enhanceStore)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment