Skip to content

Instantly share code, notes, and snippets.

@perry-mitchell
Last active 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/7eafa37752d947aba2be312856266ea8 to your computer and use it in GitHub Desktop.
Save perry-mitchell/7eafa37752d947aba2be312856266ea8 to your computer and use it in GitHub Desktop.
Redux browser state sync background
import { applyMiddleware, createStore } from "redux";
import { createSyncMiddleware, syncStore } from "redux-browser-extension-sync/background";
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