Closed npasqua closed 5 years ago
Hey, sorry for the delay. I'll take a look at the changes this weekend and see if the tests are passing. Thanks for the contribution.
Sorry for the delay. Holidays are coming in and I don't have the time to check this yet. I'll take a look after the new year. Either way this fixes a warning and it's not impeditive.
All good! I always forget to clear the timeouts. Thanks for the contribution, it's a good catch.
Clear the props.timeout and resetDelay interval when component unmounts to prevent the following React error:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
https://reactjs.org/docs/react-component.html#componentwillunmount