
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
react-extended-state
Advanced tools
A simple react provider and hook implementation to allow for state management
Sometimes React.useState
and React.useReducer
are not enough.
Sometimes you need to have a complex object and still be concerned about speed of your react components on updates.
Dont want to shell out for redux
? Actions are too much or confusing for you?
Then this is a perfect solution for you! A simple react provider and hook implementation to allow for state management of complex objects.
Usage:
import React, { FC } from 'react';
import { render } from 'react-dom';
import { createExtendedState } from 'react-extended-state';
/**
* This will be destructured, so be careful of what the top state is
**/
type State = Readonly<{ name: string }>;
const { Provider, useExtendedState, useExtendedStateDispatcher } = createExtendedState<State>();
const App: FC = () => {
const name = useExtendedState((s) => s.name);
const dispatch = useExtendedStateDispatcher();
return (
<div>
<label>
Name:
{name}
</label>
<input type="text" value={name} onChange={(e) => dispatch({ name: e.target.value })} />
</div>
);
};
render(
<Provider value={{ name: '' }}>
<App />
</Provider>,
document.querySelector('#root')
);
MIT
FAQs
A simple react provider and hook implementation to allow for state management
The npm package react-extended-state receives a total of 282 weekly downloads. As such, react-extended-state popularity was classified as not popular.
We found that react-extended-state 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.