redux-state-sync
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "redux-state-sync", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A middleware for redux to sync state in different tabs", | ||
@@ -5,0 +5,0 @@ "main": "dist/syncStorage.js", |
@@ -0,1 +1,6 @@ | ||
<p align="center"> | ||
<a href="https://github.com/AOHUA/redux-state-sync"> | ||
<img src="./logo.png" width="300px" /> | ||
</a> | ||
</p> | ||
# Redux-State-Sync 2.0 | ||
@@ -9,2 +14,7 @@ | ||
### Why Redux-State-Sync 2.0? | ||
In redux state sync 1.0, communicate between tabs are fully rely on local storage which means the actions send to other tabs are actually saved in the local storage. We also need to use JSON.stringify and JSON.parse while we saving or retrieving it and all localStorage calls are synchronous. All of this could cause performance problems. | ||
Thanks to [BroadcastChannel](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API), we now have a more efficient way to communicate between tabs instead of using any type of local storage. However, Not all the browsers support BroadcastChannel API for now. So I used pubkey's [BroadcastChannel](https://github.com/pubkey/broadcast-channel) to find the best way to communicate between tabs for redux-state-sync 2.0. [BroadcastChannel](https://github.com/pubkey/broadcast-channel) will make sure that the communication between tabs always works. | ||
### How to install | ||
@@ -11,0 +21,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
858812
42
157
2