DEV Community


Discussion on: Explain Redux like I'm five

foresthoffman profile image
Forest Hoffman

Dang, that's a fairly simple way to explain it. Well done.

When you said...

This timer starts when we first buy the apple and waits a whole week:

const weekInMilliseconds = 1000 * 60 * 60 * 24 * 7;
setTimeout(() => {
}, weekInMilliseconds)

I think you may have a typo where you used WAIT instead of ROT, which you defined earlier. If that's the case, you also reference it here:

Oh, right — we used setTimeout to wait for a week. Once that resolves, the WAIT action is dispatched and the resulting apple is this:

If not, never mind me.


mikkpr profile image
Mikk Pristavka

Oh, you are correct. I did rename the action at one point and missed a few spots. Thanks!

Thread Thread
foresthoffman profile image
Forest Hoffman

Happy to help. :)