- Honestly Reactive: the building blocks in Cycle are event-driven and RxJS is a hard dependency, which simplifies all code related to events, asynchrony, and errors. Structuring the app with RxJS also separates concerns, because Rx decouples data production from data consumption. As result, apps in Cycle have nothing comparable to imperative calls such as setState(), forceUpdate(),replaceProps(), handleClick(), etc.
- Unidirectional Dataflow: based on the Model-View-Intent architecture, data moves from Model to View, events move from View to Intent, and Intent emits "user intentions" to the Model. Model handles information, View handles display, Intent handles interaction. They are tied together as a circular loop, each one reacting to the other, but none is controlling the others.
- Functions, not classes: each node in the MVI cycle behaves like a function, receiving events as input, and outputting events. No side effects. This makes it convenient for composing with other components, or for automating tests. It also allows for a JavaScript programming style without the pitfalling this.
- Virtual DOM Rendering: Views re-render completely whenever Models emit any data. The use of virtual-dom keeps performance fast by patching the actual DOM with only the minimum necessary changes.
Scoop.it!
No comment yet.
Sign up to comment