by magnetic · 8y ago · 0 comments
I'd have expected "DECREMENT" for the decrement key... is that a bug or just me not understanding how it works?
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).