News for hackers. Stuff that matters.
Re:Show HN: Micro JavaScript framework inspired by finite-st... by magnetic on Saturday September 08, 2018 @11:40AM (#17941290)
In the "Simple Counter Example", it seems odd to me that both increment and decrement keys have the same "INCREMENT" parameter (ie Finite.Transition("INCREMENT" <- this).

I'd have expected "DECREMENT" for the decrement key... is that a bug or just me not understanding how it works?

Re:Show HN: Micro JavaScript framework inspired by finite-st... by stepanvanzuriak on Saturday September 08, 2018 @11:47AM (#17941336)
It's just typo, but (yes it's confusing) it work the same.

Let me explain: the name of Transition like 'INCREMENT' or 'DECREMENT' in this example have same "endpoint" - Counter itself. So in case like this there is no difference what Transition use, payload do all job (count + 1 or count - 1). So it's only important for debug (like action name in Redux).