redux-state-sync
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "redux-state-sync", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A middleware for redux to sync localstorage state in different tabs", | ||
@@ -11,3 +11,3 @@ "main": "syncStorage.js", | ||
"type": "git", | ||
"url": "git+https://github.com/AOHUA/redux-localstorage-sync.git" | ||
"url": "git+https://github.com/AOHUA/redux-state-sync.git" | ||
}, | ||
@@ -22,5 +22,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/AOHUA/redux-localstorage-sync/issues" | ||
"url": "https://github.com/AOHUA/redux-state-sync/issues" | ||
}, | ||
"homepage": "https://github.com/AOHUA/redux-localstorage-sync#readme", | ||
"homepage": "https://github.com/AOHUA/redux-state-sync#readme", | ||
"devDependencies": { | ||
@@ -27,0 +27,0 @@ "eslint": "^3.8.1", |
# Redux-State-Sync | ||
A middleware to sync your state across browser tabs. | ||
A very light weight middleware to sync your redux state across browser tabs. | ||
@@ -14,3 +14,3 @@ ### Installing | ||
## How to use | ||
### How to use | ||
@@ -41,51 +41,31 @@ ``` | ||
You may not want to trigger the Actions which triggers a api request. So you can simply pass in the Action type to ignore it. Like below: | ||
### Break down into end to end tests | ||
``` | ||
const config = { | ||
ignore: ['CHANGE_USERNAME', 'REPO_REQUEST'], | ||
}; | ||
createStorageListener(store, config); | ||
Explain what these tests test and why | ||
/* | ||
* To still make your state sync. You need to trigger other actions with the data from the api request. | ||
* The example is using redux-saga to handle the side effects. | ||
*/ | ||
``` | ||
Give an example | ||
``` | ||
export function* fetchRepoSaga(action) { | ||
try { | ||
const repo = yield call(api.fetchRepo, action.url); | ||
yield put({ type: 'REPO_SUCCESS', repo }); | ||
} catch (e) { | ||
yield put({ type: 'REPO_FAILURE', message: e.message }); | ||
} | ||
} | ||
### And coding style tests | ||
export function* fetchRepoWatcher() { | ||
yield* takeLatest(REPO.REQUEST, fetchRepoSaga); | ||
} | ||
Explain what these tests test and why | ||
export default [ | ||
fetchRepoWatcher, | ||
]; | ||
``` | ||
Give an example | ||
``` | ||
## Deployment | ||
Add additional notes about how to deploy this on a live system | ||
## Built With | ||
* [Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used | ||
* [Maven](https://maven.apache.org/) - Dependency Management | ||
* [ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds | ||
## Contributing | ||
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. | ||
## Versioning | ||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). | ||
## Authors | ||
* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth) | ||
See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. | ||
## License | ||
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details | ||
## Acknowledgments | ||
* Hat tip to anyone who's code was used | ||
* Inspiration | ||
* etc |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
1
3450
70