
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-syncing
Advanced tools
Synchronize state between react components using pubsub.
Extends your main class (the typical App) from Master, the rest from Slave, the source of trust will be the Master
If you extends from Master or Slave:
instead of using setState, use set,
instead of using componentWillUnmount, use willUnmount,
and instead of using componentDidMount, use didMount
That's all!
import {Master} from "react-syncing";
export class App extends Master {
render() {
return (
<div>
<p>{this.state.name}</p>
<NameInput />
</div>
);
}
}
From another component
import {Slave} from "react-syncing";
export class NameInput extends Slave {
didMount() {
// Default name
this.set({ name: "Name" });
}
render() {
return <input onInput={e => this.set({ name: e.target.value })} />;
}
}
https://kidandcat.github.io/sync-performance/
All the squares are syncing the state with the Root element that keeps changing the color and adding new elements. Only the firs Square receives the color as a prop. The first square shows the number of rendered elements.
In my computer, it renders 200 elements without any issue. After that, it start suffering delays, I would need to test react alone too. Anyway, obviously, you shouldn't be syncing every single component of your webpage.
MIT
FAQs
Sync state in React
The npm package react-syncing receives a total of 2 weekly downloads. As such, react-syncing popularity was classified as not popular.
We found that react-syncing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.