UNPKG

rooks

Version:

Essential React custom hooks ⚓ to super charge your components!

14 lines (13 loc) 396 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useRenderCount = void 0; var react_1 = require("react"); /** * useRenderCount * @description Get the render count of a component * @see {@link https://react-hooks.org/docs/useRenderCount} */ function useRenderCount() { return ++(0, react_1.useRef)(0).current; } exports.useRenderCount = useRenderCount;