# @tinkoff/react-hooks

> Set of React Hooks

Latest version **0.5.4** (published 2026-03-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @tinkoff/react-hooks
pnpm add @tinkoff/react-hooks
yarn add @tinkoff/react-hooks
bun add @tinkoff/react-hooks
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.4 |
| Published | 2026-03-17 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 130 |
| Maintainers | tinkoffbank, dmitry-korolev, yeahga, hondasmx, makar_l, rouland, ishivan, ytsareva, shoom3301, waterplea, meskill, marsibarsi, zig-green, super_oleg, dersizes, alexkvak, sradyukov |

## Links

- npm: https://www.npmjs.com/package/@tinkoff/react-hooks
- Repository: https://github.com/tramvaijs/tramvai
- Homepage: https://github.com/tramvaijs/tramvai#readme
- Issues: https://github.com/tramvaijs/tramvai/issues
- npm.io page: https://npm.io/package/@tinkoff/react-hooks

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [@tinkoff/utils](https://npm.io/package/@tinkoff/utils.md) ^2.1.2

## Recent versions

- 0.5.4 (latest) — 2026-03-17
- 0.6.1 (prerelease) — 2025-12-26
- 0.4.6 (stable-v5.x.x) — 2025-12-26
- 0.5.3 — 2025-12-26
- 0.5.2 — 2025-12-18
- 0.4.5 — 2025-12-18
- 0.4.4 — 2025-11-19
- 0.5.1 — 2025-10-13
- 0.4.3 — 2025-09-23
- 0.5.0 — 2025-09-16
- 0.3.3 — 2024-10-17
- 0.4.2 — 2024-10-02
- 0.3.1 — 2024-04-03
- 0.2.1 — 2023-10-24
- 0.2.0 — 2023-10-23
- … 11 more at https://npm.io/package/@tinkoff/react-hooks/versions

## README

# @tinkoff/react-hooks

Set of React Hooks

## Api

### useShallowEqual

Makes shallow equal check for passed argument. If current argument is equal to previous then result of the hook will not be changed. Otherwise it will be equal to a current argument.

```tsx
import { useEffect } from 'react';
import { useShallowEqual } from '@tinkoff/react-hooks';

export function Cmp({ obj }) {
  // obj - some object
  // objRef - reference to object. For example, if reference obj were changed after sequential render,
  // but it still shallow equals to initial obj then objRef will reference to the initial obj ссылка на объект obj
  const objRef = useShallowEqual(obj);

  useEffect(() => {
    // React checks deps with reference equality that may lead to unnecessary hook call when reference were changed
    // but we care only about actual changes to object itself not reference
    // in that case objRef will not lead to effect call in case new reference is shallowly equal to previous
  }, [objRef]);
}
```

### useIsomorphicLayoutEffect

Use `useLayoutEffect` in universal code without React warnings

---
_Source: https://npm.io/package/@tinkoff/react-hooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
