
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-plugs
Advanced tools
Experimental framework for pluggable components using react and rxjs.
A connection is composed by Observables for outputting data, Observers for data input, a Properties observable for feeding a react functional component and the react functional component itself.
All those properties are optional. For example you can have a connection that has only an output and does not render or a connection the has only an input and renders something.
A connection is plugged into the hub using the plug function. The subscription of observers is done depending on the component name and its inputs and outputs.
This is an example of a widget that shows a random number
import { Hub, Plug } from 'react-plugs'
import { Subject } from 'rxjs'
import * as React from 'react'
const randomNumberSource: Subject<any> = new Subject()
setInterval( () => {
randomNumberSource.next({randomNumber: Math.random()})
}, 2000)
class RandomNumberGenerator implements Plug {
name = "RandomNumberGenerator"
outputs = [
{
name: "number",
outputObservable: randomNumberSource
}
]
}
class RandomNumberDisplay implements Plug {
name = "RandomNumberDisplay"
inputs = [
{
source: "RandomNumberGenerator:number",
inputSubscriber: (randomNumberGeneratorOutput) => {
randomNumberDisplayProps.next({randomNumber: randomNumberGeneratorOutput.randomNumber})
}
}
]
renderer = {
props: randomNumberDisplayProps,
functionComponent: ({randomNumber}) => <p>Random number: {randomNumber}</p>
}
}
const hub = new Hub()
hub.plug(new RandomNumberGenerator())
hub.plug(new RandomNumberDisplay())
See more on the demo
FAQs
Framework for pluggable react components and rxjs observables
The npm package react-plugs receives a total of 3 weekly downloads. As such, react-plugs popularity was classified as not popular.
We found that react-plugs 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.