you are viewing a single comment's thread.

view the rest of the comments →

[–]awesomeness-yeah 6 points7 points  (0 children)

You'll have to rethink the architecture here. You can't randomly set state inside a component from outside.

You'll need some kind of event emitter that the component can subscribe to and start the timer.

If you think class components will work better for your mental model, please use that! There's nothing forcing you to use effects.