rsnext/examples/with-turbopack/ui/count-up.tsx
Maia Teegarden e5eab8b38d
update with-turbopack example (#49332)
Updated to latest app-playground code
2023-05-18 17:33:02 +00:00

25 lines
344 B
TypeScript

'use client'
import { useCountUp } from 'use-count-up'
const CountUp = ({
start,
end,
duration = 1,
}: {
start: number
end: number
duration?: number
}) => {
const { value } = useCountUp({
isCounting: true,
end,
start,
duration,
decimalPlaces: 1,
})
return <span>{value}</span>
}
export default CountUp