glennreyes / glennreyes/react-countup
when close the page that contains the 'CountUp' component cause memory leaks
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
Firstly, thanks to the author for providing such an amazing component, when I use the component according to the API interface, I had some problems.
Here's the code
```javascript
const ChildComponent = ({ value }) => {
const { countUp, update } = useCountUp({ start: 0, end: value, duration: 2 });
React.useEffect(() => {
update(value);
}, [update, value]);
return (
);
};
export default ChildComponent
```
When I close a page that contains the 'ChildComponent' component, some error occur that cause memory leaks like this

May I ask the author, how should I solve this problem.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.