|
|
|
|
|
by chrisz4
1918 days ago
|
|
Let's step back. I think your approach work really well if you model state machine for internal usage. However, Redux is meant to be for UI work, which is a side effect. You cannot control side-effect. You cannot guarantee that user will not try to turn switch off twice. Even in idiomatic Redux, the switch case for reducer always include `default:` which mean everything else go here. As you said, the Redux FSM models a car lock button interface which is exactly what Redux try model. |
|