Skip to content

geobde/useRerender

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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'

Read More

React Performance

About

React hook to detect component mount, unmount & re-renders.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published