
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
@etheryte/react-hooks
Advanced tools
@etheryte/react-hooks
Common React hooks for
yarn add @etheryte/react-hooks
useUpdateEffect(effect, dependencies?)
Same as useEffect
, but only when the dependencies change, not on the first render.
useEffect
fires on the first render and then whenever dependencies change, useUpdateEffect
fires only when the dependencies change.
useAsyncEffect(asyncEffect, dependencies?)
useEffect
with async helpers. The effect is passed a function isStale
which returns a boolean value indicating whether the dependencies have changed between the start of the async effect and the moment you call it.
useAsyncEffect(async (isStale) => {
const result = await longRequest();
// If the dependencies changed between the request start and now, discard the result
if (isStale()) {
return;
}
setFoo(result);
}, dependencies);
useAsyncUpdateEffect(asyncEffect, dependencies?)
Combines useUpdateEffect
and useAsyncEffect
.
FAQs
Common React hooks for worry-free state and control flow management.
The npm package @etheryte/react-hooks receives a total of 660 weekly downloads. As such, @etheryte/react-hooks popularity was classified as not popular.
We found that @etheryte/react-hooks demonstrated a healthy version release cadence and project activity because the last version was released less than 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
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.