New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@webeach/react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webeach/react-hooks

A set of smart React hooks for performant UIs (React 18+)

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source
react-hooks


npm package build npm downloads

🇺🇸 English version | 🇷🇺 Русская версия

A set of smart React hooks for performant UIs (React 18+)

💎 Highlights

  • Fewer re-renders. Hooks update state only when needed: lazy flags, stable handlers and refs.
  • Hybrid return. Many hooks can be used as a tuple or as an object — pick the shape you prefer.
  • Clean effects. Subscriptions and cleanup are sensible by default; behavior is predictable.
  • SSR-ready. Browser APIs are touched strictly inside effects.

📦 Installation

npm install @webeach/react-hooks

or

pnpm install @webeach/react-hooks

or

yarn add @webeach/react-hooks

📥 Import

ES Modules

import { useBoolean } from '@webeach/react-hooks/useBoolean';
import { useEffectCompare } from '@webeach/react-hooks/useEffectCompare';
import { useWindowEvent } from '@webeach/react-hooks/useWindowEvent';

// or
import { useBoolean, useEffectCompare, useWindowEvent } from '@webeach/react-hooks';

CommonJS

const { useBoolean } = require('@webeach/react-hooks/useBoolean');
const { useEffectCompare } = require('@webeach/react-hooks/useEffectCompare');
const { useWindowEvent } = require('@webeach/react-hooks/useWindowEvent');

// or
const { useBoolean, useEffectCompare, useWindowEvent } = require('@webeach/react-hooks');

🌿 Tree‑shaking

  • Every hook is available as an individual module path (@webeach/react-hooks/useX). Importing this way pulls only the code you need — the most predictable and compact option for any bundler (ESM and CJS).
  • Named import from the package root (@webeach/react-hooks) supports tree‑shaking in bundlers that optimize ES modules (Vite/Rollup/esbuild/Webpack 5 in production). Unused exports will be removed at build time.
  • For CommonJS projects, we recommend per‑module imports (require('@webeach/react-hooks/useX')) to avoid pulling extra code through the index.

🛠 Hooks

Alphabetical

By category

State — simple primitives

State — object patterns

State — collections

State — storage (persistence)

Timers, loops & frames

Rate limiting (throttle/debounce)

Async operations

Dependency optimization

Lifecycle

Refs

Events

Observers

Page & document

Utilities

🧩 Dependencies

This package has a single external dependency@webeach/collection.

  • It is used only by the useCollection hook.
  • Other hooks do not import or require collection.

🔖 Releasing

Releases are automated with semantic-release.

Before publishing a new version, make sure that:

  • feat: ... — new features
  • fix: ... — bug fixes
  • chore: ..., refactor: ..., etc. — as needed
  • The next version (patch, minor, major) is derived automatically from the commit types.

👤 Author

Developed and maintained by Ruslan Martynov.

Have an idea or found a bug? Open an issue or send a pull request.

📄 License

This package is distributed under the MIT License.

Keywords

react

FAQs

Package last updated on 20 Sep 2025

Did you know?

Socket

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.

Install

Related posts