Description
The scrollSpyOnce prop is not functioning as expected. The animation restarts each time the component comes into the viewport instead of running only once.
Code Example
<CountUp
scrollSpyOnce
end={amount}
decimals={2}
formattingFn={num => Intl.NumberFormat(getUserLocale(), {
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(num)}
/>{' '}{selectedCurrency}
Observed Behavior
The counter animation starts again and again whenever the component comes into view, despite using the scrollSpyOnce prop.
Expected Behavior
The animation should only run once when the component comes into view for the first time.
Additional Details
Version: 6.5.0
Description
The
scrollSpyOnceprop is not functioning as expected. The animation restarts each time the component comes into the viewport instead of running only once.Code Example