Skip to content

useProgressiveCount

This hook allows you to set a progressive count from and to a value.

{
value: number,
options?: {
inicialValue: number, // By default 0
interval: number, // By default 0
incrementalValue: number // By default 1
}
}

The useProgressiveCount hook returns the correspondig number number of the count:

import { useProgressiveCount } from '@tecnosamba21/sam-hooks'
export function ProgressiveCount() {
const count: number = useProgressiveCount(10)
return <h1>{count}</h1>
}