What did you use to manage state, data flow, communication to servers, etc?
What did you use to manage state, data flow, communication to servers, etc?
Of the implementations of Flux, Reflux is pretty good, with less hassle of a centralized dispatcher, and extra boilerplate.
What I don't get is that the `trigger` is essentially a store created action, which goes against the unidirectional data flow model.
That said the stores and trigger method are definitely one of the rougher areas in the app. Thinking back, the stores were probably the largest source of bugs, but they also contain more logic so it's reasonable to assume they would have higher bug density.
Reflux was a great stepping stone, but this is the area I would most like to refactor and/or spend more time on in future projects. Fortunately there's a lot of interesting work going on in this area right now.
Or are advocating reinventing the wheel and writing a bunch of boiler plate javascript to marshal data, update state, etc?
----
One major reason to use a JS framework is to enforce good design and coding practices to allow for more maintainable code.
You can certainly implement these patterns yourself in Javascript, but you are reinventing the wheel, which is an antipattern in pretty much all but the edgiest cases.
There is some stuff like routers etc. that you might not want to write yourself. Luckily there is a universe of components you can choose from, instead of one that some guy at google thought was good.