Getting started
Installation
Prerequisites
- Node.js version 18 or higher.
- A package manager: e.g. npm, pnpm, ...
sh
$ npm add @ogs-gmbh/react-hookssh
$ pnpm add @ogs-gmbh/react-hookssh
$ yarn add @ogs-gmbh/react-hookssh
$ bun add @ogs-gmbh/react-hooksUsage
We offer various React Hooks. Each React Hook shows its usage and is documented. Please check the list below:
| Hook | Use-Case |
|---|---|
useInitialize | Call only on immediate component render, not on subsequent updates |
useKey | Detect Key-Events |
useLatencyBoundState | Like React's useState, but with delay |
useLazyEffect | Calling the effect only on updates, not on the first render |
useMounted | Checking if the component is mounted |
useMountedEffect | Calling the effect only when the component is mounted |
useMountedState | Checking if the component is mounted |
usePreviousState | Getting the previous state value |
usePromise | Handling promises |