Figured out the problem. In my custom hook I added functional dependencies: Set_value and Expired_callback. Expired_callback was causing timer to freeze because it was probably recreated during re-renders and it forced useEffect inside hook to call its return callback first (clears interval) and execute its body with new arguments. Frequent re-renders made it to stun. Removing functional dependency Expired_callback from hooks dependencies array solved the issue. Update: wrapping actual function that will be passed in custom hook as 'Expired_callback' in App component in the useCallback() react hook also solves the problem.