I am planning to make a buttons onClick function automatic after 2 minutes. This is my current button and the function I am calling is handle event videos.
How can I trigger that the button is automatically clicked after 2 minutes. I planned to create a new function and call the handleEventVideos() in there and then pass that function in useEffect. But that doesn't work. Can anyone please help me how I can do this?
<Button
disabled={isDisable}
type="submit"
onClick={() => handleEventVideos()}
variant="contained"
className={classes.doneButton}
>
Done
</Button>