clearTimeinterval didn’t work when the component is in unmount stage
Here i created simple button when the button pressed given component is visible to in the screen and start timeInterval of 3 seconds but when the component is unmount then i return the clearInterval function but still the timeInterval didn’t stopped so here what is the problem? Here is the code