
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
sharper-react-utils
Advanced tools
A collection of React hooks to simplify your applications.
A collection of React hooks to simplify your applications.
npm install react-utils
Description: The useDebounce
hook delays updating the value until after a specified delay period has passed since the last value change. This is useful for limiting the rate of updates to expensive computations or API calls.
import React, { useState } from 'react';
import useDebounce from 'react-utils/hooks/useDebounce';
const DebounceExample: React.FC = () => {
const [inputValue, setInputValue] = useState('');
const debouncedValue = useDebounce(inputValue, 500);
return (
<div>
<input
type="text"
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
placeholder="Type something..."
/>
<p>Debounced Value: {debouncedValue}</p>
</div>
);
};
Description: The useLocalStorage
hook synchronizes a state variable with localStorage
. It allows you to easily persist state between page refreshes.
import React from 'react';
import useLocalStorage from 'react-utils/hooks/useLocalStorage';
const LocalStorageExample: React.FC = () => {
const [name, setName] = useLocalStorage('name', '');
return (
<div>
<input
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="Enter your name..."
/>
<p>Your name is: {name}</p>
</div>
);
};
FAQs
A collection of React hooks to simplify your applications.
The npm package sharper-react-utils receives a total of 0 weekly downloads. As such, sharper-react-utils popularity was classified as not popular.
We found that sharper-react-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.