# @rosinfo.tech/react

> [![rosinfo.tech](https://cdn.rosinfo.tech/id/logo/id_logo_width_160.svg "rosinfo.tech")](https://rosinfo.tech)

Latest version **0.0.9** (published 2024-08-02) · 0 weekly downloads

## Install

```sh
npm install @rosinfo.tech/react
pnpm add @rosinfo.tech/react
yarn add @rosinfo.tech/react
bun add @rosinfo.tech/react
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2024-08-02 |
| First published | 2023-07-30 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | roskoshinsky |

## Links

- npm: https://www.npmjs.com/package/@rosinfo.tech/react
- npm.io page: https://npm.io/package/@rosinfo.tech/react

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^18.3.1
- [tslib](https://npm.io/package/tslib.md) ^2.6.3
- [@rosinfo.tech/utils](https://npm.io/package/@rosinfo.tech/utils.md) ^0.2.6
- [@rosinfo.tech/browser](https://npm.io/package/@rosinfo.tech/browser.md) ^0.0.2

## Recent versions

- 0.0.9 (latest) — 2024-08-02
- 0.0.8 — 2023-09-05
- 0.0.7 — 2023-08-15
- 0.0.6 — 2023-08-13
- 0.0.3 — 2023-07-31
- 0.0.2 — 2023-07-30
- 0.0.1 — 2023-07-30

## README

[![rosinfo.tech](https://cdn.rosinfo.tech/id/logo/id_logo_width_160.svg "rosinfo.tech")](https://rosinfo.tech)

# @rosinfo.tech/react

## Installation

```shell
npm i @rosinfo.tech/react
```

## Usage

ES6:

```typescript
import { useRender } from "@rosinfo.tech/react/useRender";

// or
// import { useRender } from "@rosinfo.tech/react";

// ...
const reRender = useRender();
// ...
```

## Functions

```typescript
import { IColorizeOptions } from "@rosinfo.tech/utils/colorize";

import { RefObject } from "react";

interface IUseColorizeReturn {
    colorizeRefSet: (HTMLElement?: HTMLElement | null) => void;
}

export declare function useColorize(options?: Omit<IColorizeOptions, "node">): IUseColorizeReturn;

interface IUseColorizeCommitProps extends Omit<IColorizeOptions, "node"> {
    commitDependencies?: Array<any>;
    name: string;
    withLog?: boolean;
}

export declare function useColorizeCommit<T = HTMLDivElement>(options?: IUseColorizeCommitProps): {
    colorizeCommitRef: import("react").RefObject<T>;
};

interface IUseColorizeRenderProps extends Omit<IColorizeOptions, "node"> {
    name: string;
    withLog?: boolean;
}

export declare function useColorizeRender<T = HTMLDivElement>(options?: IUseColorizeRenderProps): {
    colorizeRenderRef: import("react").RefObject<T>;
};

export declare const useIsMounted: () => RefObject<boolean>;

export declare function useRender(): () => void;

type TUseRenderCounterReturn = [number, VoidFunction];

export declare function useRenderCounter(): TUseRenderCounterReturn;

interface IUseToggleOptions<P, N> {
    valueInitial: P | N;
    valueNegative: N;
    valuePositive: P;
}

interface IUseToggleReturn<P, N> {
    toggle: () => void;
    toggleOff: () => void;
    toggleOn: () => void;
    toggleSet: (value: P | N) => void;
    toggleValue: P | N;
}

export declare function useToggle<P = true, N = false>({ valueInitial, valueNegative, valuePositive, }?: IUseToggleOptions<P, N>): IUseToggleReturn<P, N>;
```

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