use-is-rerender
v2.0.0
Published
React hook to detect component mount, unmount & re-renders
Downloads
31
Readme
React hook to detect component mount, unmount & re-renders.
See Demo
Install
npm i use-is-rerender --save
yarn add use-is-rerender
Usage
import { useRerender } from 'use-is-rerender'
const Button = () => {
useRerender()
return <button>Click</button>
}
Available hook options
Option | Acceptable Values | Details ---------|------------------------------------------------------------------------------|--- logProps | true (default)false | Can disable props logging
Production mode
Hook not working when NODE_ENV==='production'