Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@slango/reazione

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

@slango/reazione

Collection of generic react utilities

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
315
Maintainers
1
Weekly downloads
 
Created
Source

Reazione (@slango/reazione)

Collection of generic react utilities ("reazione" is Italian for reaction).

Installation

pnpm add @slango/reazione

Requires react ^19 as a peer dependency.

Hooks (@slango/reazione/hooks/*)

  • useDebouncedCallback — debounced wrapper around a callback with run/cancel and unmount cleanup.
  • useMountedfalse during SSR/hydration, true after mount.
  • useClickOutside — invoke a handler when clicking outside an element.
  • useClientValue — resolve a client-only value after hydration without mismatches.
  • usePreventScrolling — lock background scroll, compensating for the scrollbar width.
  • useScrollEdge — debounced notification when scrolling approaches an edge.

Usage

import { useDebouncedCallback } from '@slango/reazione/hooks/useDebouncedCallback';

const Search = ({ onSearch }: { onSearch: (term: string) => void }) => {
  const debounced = useDebouncedCallback(onSearch, 300);

  return <input onChange={(e) => debounced.run(e.target.value)} />;
};
import { Edge, useScrollEdge } from '@slango/reazione/hooks/useScrollEdge';

useScrollEdge({ edge: Edge.BOTTOM, onEdgeReached: loadNextPage });

Testing

Run linting and unit tests:

pnpm lint
pnpm test

Contributing

Issues and pull requests are welcome.

FAQs

Package last updated on 09 Jun 2026

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