Conditional checking in nested functions

I was told that the following lines of code don´t check for the conditions inside setInterval, it only checks it once in the handler method.
I don´t know why, though. Could anyone explain?

Your condition isn’t inside setInterval, place it right after this.setState, it should work.