Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 386 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 386 Bytes

useTraceUpdate

A hook to trace updates to React function components

useTraceUpdate is a React Hook that logs to the console prop changes.

Install

  • npm install use-trace-update or
  • yarn add use-trace-update

Use

import useTraceUpdate from 'use-trace-update';

const MyButton = (props: AllProps) => {
  useTraceUpdate(props)
  return <button />;
};