
Research
lightning PyPI Package Compromised in Supply Chain Attack
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.
react-persist
Advanced tools
Persist and rehydrate React state to localStorage.
npm install react-persist --save
Just import the <Persist > component and pass it the data you want it to persist. It renders null, so it can go wherever you need it to....
import React from 'react'
import { Persist } from 'react-persist'
class Signup extends React.Component {
state = {
firstName: '',
lastName: '',
email: '',
isLoading: false,
error: null
};
// ...
render() {
return (
<form onSubmit={this.handleSubmit}>
{/* whatever....*/}
<Persist
name="signup-form"
data={this.state}
debounce={500}
onMount={data => this.setState(data)}
/>
</form>
)
}
Only a few of them!
name: string: LocalStorage key to save form state todata: any: Data to persistdebounce:? number: Number of ms to debounce the function that saves form state. Default is 300.onMount: (data: any) => void: (optionally) Hydrate your data (into React state). Will only be called if data is not null.FAQs
Persist and rehydrate React state
The npm package react-persist receives a total of 2,537 weekly downloads. As such, react-persist popularity was classified as popular.
We found that react-persist 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.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.