Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-state-sync

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-state-sync - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

logo.png

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc