DEV Community

Discussion on: Why not to use setInterval

Collapse
 
ne0nx3r0 profile image
Robert Manzano

Yeah typically I'd expect either a conditional in your response function.

That's also generally how Redux ajax requests are patterned with Redux-Thunk, you would have a conditional in your response handling to verify if it still makes sense to replace the state.