Last active
April 15, 2019 10:23
-
-
Save perry-mitchell/7eafa37752d947aba2be312856266ea8 to your computer and use it in GitHub Desktop.
Redux browser state sync background
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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