I'd like to dispatch an action every second to update the display of a stateless component. My initial naive attempt involved calling window.setInterval
in the render function, which is then called each time the component renders, starting a new timer each time.
I've considered closing over a variable that indicates whether or not the timer has already started, but that would violate the concept of a stateless component. I'm wondering what the appropriate way to accomplish this via React+Redux would be, ideally while continuing to use a stateless component.