
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
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.
@dutils/react-utils
Advanced tools
🛠️ A lightweight, zero-dependency collection of ergonomic React utilities built for modern apps.
This package starts with a few core utilities and will grow incrementally over time as new needs arise. All utilities are React 18+ compatible and written in TypeScript.
useIsomorphicLayoutEffect
A drop-in replacement for useLayoutEffect
that avoids SSR warnings by falling back to useEffect
during server-side rendering.
useEvent
A stable callback hook that always references the latest function — useful for event handlers, timeouts, and effects.
Inspired by the upcoming React RFC for useEvent
and Dan Abramov’s commentary on the use of useInsertionEffect
to optimize ref timing.
canUseDOM
Simple utility that detects whether your code is running in a browser environment.
npm install @dutils/react-utils
# or
yarn add @dutils/react-utils
This library isn’t trying to be a massive grab-bag of helpers. Instead, it focuses on adding small, well-tested, and reusable building blocks that solve real problems encountered in everyday React development.
Utilities will be added as they’re needed, not just for the sake of it.
MIT
FAQs
A lightweight collection of reusable React utilities.
We found that @dutils/react-utils 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
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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.