Using a Timer to Change Component State After Number of Seconds

I’m just posting this here in case anyone else searches for it in the future. It wasn’t laid out like this an any other post.

setTimeout(() => {
this.setState({visualStateIndexOverride: 1});
}, 2000);


Thank you! I plan on using this in an idea I have in mind. I will let you know when I put it in practice :slight_smile:

1 Like