React hook to detect component mount, unmount and re-renders

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

Installation

Using npm:

npm i use-is-rerender --save

Usage

Import the hook:

import { useRerender } from "use-is-rerender";

Full example

import { useRerender } from "use-is-rerender";

const Button = () => {
  useRerender();
  return <button>Click</button>;
};

Built With

React

License

MIT

GitHub

View Github