
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-rain-animation
Advanced tools
A stateful rain animation component for your react project. No SVG animations no jQuery, no additional dependencies. Addapted from raichu26's codepen. Live demo here
To install this Component, run yarn add react-rain-animation or npm install react-rain-animation.
##Simple
To use the component, In your react Application just import the component and styles. Also make sure to specify the numDrops property, as it is required.
import React from 'react';
import ReactRain from 'react-rain-animation';
// import all the styles
import "react-rain-animation/lib/style.css";
const MyComponent = (props) => {
return (
<ReactRain
numDrops="500"
/>
}
export default MyComponent;
###With Changing State
To have user input change the number of drops rendered, include this component and some sort of input component (this example uses react-canvas-knob) as sibblings inside of a parent component.
To avoid the "Maximum call stack size exceded" error, make sure to have 2 separate handlers (i.e. onChange and onChaneEnd). This way, the number of drops does not have to update every time the input value changes, but rather when the user has finished changing the input.
import React, { Component } from 'react';
import ReactRain from 'react-rain-animation';
import Knob from 'react-canvas-knob';
import 'react-rain-animation/lib/style.css';
const initVal = 25;
class MyComponent extends Component {
constructor(props) {
super(props);
this.state = {
numDrops: initVal,
knobValue: initVal
};
}
handleChange = newValue => {
this.setState({ knobValue: newValue });
}
onChangeEnd = () => {
console.log(this.state.numDrops);
this.setState({ numDrops: this.state.knobValue });
}
render() {
return (
<div>
<ReactRain numDrops={ this.state.numDrops }/>
<Knob className="Knob"
onChange={ this.handleChange }
onChangeEnd={ this.onChangeEnd }
value={ this.state.knobValue }
/>
</div>
);
}
}
export default MyComponent;
FAQs
rain animation component
The npm package react-rain-animation receives a total of 97 weekly downloads. As such, react-rain-animation popularity was classified as not popular.
We found that react-rain-animation 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.