glennreyes / glennreyes/react-countup

ScrollSpyOnce prop is not working

Open
#876 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.1k
Forks
138
PR merge metrics
No merged PRs in 30d

Description

### 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
```jsx
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.