|
|
|
|
|
by acemarke
3091 days ago
|
|
I'm a Redux maintainer, and both Dan Abramov and I would disagree. Describing behavior as plain object actions _is_ a form of indirection, compared to code that directly applies a state update. It's a tradeoff. Use of plain object actions takes some more code, but opens up the power of middleware and time travel debugging. |
|
Maybe you’re using it in a different context than I’m used to but I don’t see anything indirect about “call function that passes it’s result to another that updates the data”.
Sure it’s not “update state directly” but that would make every pattern “indirect” which makes little sense.
What you’re describing would make any MVP, pubsub, or observable system indirect. If so, well, fine - fair enough - but it still makes OPs complaint strange.
(Thanks for all your work btw)