fn
useRenderCount
v0.0.1testeddemoReturns the number of times the component has been rendered into the DOM
Examples
ts
const count = useRenderCount();ts
const count = useRenderCount(getCurrentInstance());Demo
Loading demo…
Signature
ts
export function useRenderCount(instance?: ComponentInternalInstance){ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
instance? | ComponentInternalInstance | undefined | The component instance to track the render count for |
Returns
anyThe number of times the component has been rendered