when close the page that contains the 'CountUp' component cause memory leaks
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
const ChildComponent = ({ value }) => {
const { countUp, update } = useCountUp({ start: 0, end: value, duration: 2 });
React.useEffect(() => {
update(value);
}, [update, value]);
return (
<div>{countUp}</div>
);
};
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.
@Ice-Panda it will be nice if you could make small repro. Cause it's quite difficult to investigate
This memory leak issue is also very annoying in tests
@vertic4l could you provide a representation of this bug? I tried to reproduce it, but I didn’t face with this issue