R
fn

useRenderCount

v0.0.1testeddemo

Returns 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

ParameterTypeDescription
instance?ComponentInternalInstance | undefinedThe component instance to track the render count for

Returns

anyThe number of times the component has been rendered