browser-redux-sync
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "browser-redux-sync", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Keep redux states in sync for browser extensions and apps.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
# Cross-browser extensions and Chrome apps states syncing | ||
Add syncing to your [redux](https://github.com/gaearon/redux) browser (Chrome and [Firefox](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities#storage)) extension or app with 1 line. | ||
Add syncing to your [redux](https://github.com/gaearon/redux) browser (Chrome and [Firefox](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities#storage)) extension or app. | ||
It listens to the `chrome.storage` for [redux-persist](https://github.com/rt2zz/redux-persist) events. When an event occurs it will dispatch a rehydrate action. | ||
@@ -10,7 +10,7 @@ If `chrome.storage` is not defined (for Safari and old versions of Firefox), it includes [redux-persist-crosstab](https://github.com/rt2zz/redux-persist-crosstab) to use `localStorage`. | ||
import { persistStore, autoRehydrate } from 'redux-persist' | ||
import sync from 'browser-redux-sync' | ||
import { configureSync, sync } from 'browser-redux-sync' | ||
const finalCreateStore = compose(autoRehydrate())(createStore) | ||
const store = finalCreateStore(reducer) | ||
const persistor = persistStore(store, {}) | ||
const persistor = persistStore(store, configureSync()) | ||
sync(persistor) | ||
@@ -17,0 +17,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39301
0