Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@rooks/use-localstorage
Advanced tools
npm install rooks
or
yarn add rooks
Rooks is completely treeshakeable and if you use only 1 of the 50+ hooks in the package, only that hook will be bundled with your code. Your bundle will only contain the hooks that you need. Cheers!
Localstorage hook for React. Syncs with localstorage values across components and browser windows automatically.
Sets and retrieves a key from localStorage and subscribes to it for updates across windows.
npm install --save @rooks/use-localstorage
import useLocalstorage from "@rooks/use-localstorage";
function Demo() {
const [value, set, remove] = useLocalstorage("my-value", 0);
// Can also be used as {value, set, remove}
return (
<p>
Value is {value}
<button onClick={() => set(value !== null ? value + 1 : 0)}>
Increment
</button>
<button onClick={remove}>Remove </button>
</p>
);
}
render(<Demo />);
FAQs
Local Storage hook for React
We found that @rooks/use-localstorage 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.