Skip to main content

useRenderCount

Returns the number of times the component has been rendered.

Example

import { useRenderCount } from '@atomicjolt/hooks';

function MyComponent() {
const renderCount = useRenderCount();
return <div>Rendered {renderCount} times</div>;
}