Skip to content

useRenderInfo ​

Hook for getting information about component rerender

lifecycle
test coverage
Last changed: last month

Installation ​

Library
CLI
Manual
typescript
import { useRenderInfo } from '@siberiacancode/reactuse';

Usage ​

typescript
const rerenderInfo = useRenderInfo('Component');

Demo ​

Api ​

Parameters

NameTypeDefaultNote
name?string'Unknown'Component name
log?booleantrueToggle logging

Returns

UseRenderInfoReturn

Type declaration ​

typescript
export interface UseRenderInfoReturn {
  component: string;
  renders: number;
  sinceLast: number;
  timestamp: number | null;
}

Source ​

Source • Demo

Contributors ​

D
debabin
debabin
H
hywax
hywax
G
Gorilla Dev
Gorilla Dev

Released under the MIT License.