Created
April 15, 2019 10:23
-
-
Save perry-mitchell/c601eefcb0fc312b6bf642f43c3539a7 to your computer and use it in GitHub Desktop.
Redux browser state sync component
This file contains hidden or 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"; | |
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