Skip to content

Instantly share code, notes, and snippets.

@perry-mitchell
Created April 15, 2019 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perry-mitchell/c601eefcb0fc312b6bf642f43c3539a7 to your computer and use it in GitHub Desktop.
Save perry-mitchell/c601eefcb0fc312b6bf642f43c3539a7 to your computer and use it in GitHub Desktop.
Redux browser state sync component
import { applyMiddleware, createStore } from "redux";
import { createSyncMiddleware, syncStore } from "redux-browser-extension-sync";
import rootReducer from "../reducers/index.js";
const syncMiddleware = createSyncMiddleware();
const store = syncStore(createStore(
rootReducer,
applyMiddleware(syncMiddleware)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment