Echo JS 0.11.0

<~>

tracker1 2084 days ago. link 1 point
With Redux (flux pattern), it's often in the context of a 1-way UI rendering/updating process, which simplifies larger applications a lot.

Also, what is described by handlers isn't so different in practice than more complex action creators that dispatch a new object that should replace the old in the state tree.  And while not expressly immutable, shallow clones are often the preference.

The pattern described in the article in practice takes a *LOT* of coordination for anything beyond trivial.  Also, at scale encapsulation (OO) patterns, especially with inheritance act a lot slower.  You're actually better off having an action library that acts on objects over objects that act on themselves as a result (such as a game, for example).

It's worth looking at video game development, even if you aren't writing games for some examples here.  Of course as with anything else, you will find more and less elegant designs in practice.
lukaszmakuch 2083 days ago. link 1 point
Hi! Thanks for the comment. 🙂

Video game development is a very interesting branch of our industry! It's one of the few where state machines are used to handle complex logic, like the behavior of characters. It apparently turns out that using IFs and boolean flags for complex, stateful behavior (like games or UIs) makes the code a lot harder to understand and work with.