React and Flux - scale from small widgets to gigantic apps.
More presentations: https://speakerdeck.com/fisherwebdev
React is just a view layer - so how to get started without learning Backbone or another framework -> Flux.
Two-way data binding makes it even more complicated - no single point of truth.
Can be solved with Pub/Sub -> will solve connection problems. But then need to control the order of events. And it’s still hard to understand the system.
With good naming conventions, code will become somewhat DSL.
Stores are completely isolated from rest of app.
any other method from other objects are automatically mocked.
ControllerViews - views that pull data out of the store and provide them to their children views.
Usually should be at top hierarchy of your app, when deeper, event streams are hard to debug.
How to integrate jQuery widgets to React ecosystem.
Component has lifecycle, in componentDidMount you have access to DOM node through this.getDOMNode()
How to update stores based on other stores?
All of the stores will receive same action from Dispatcher, it dependant store use waitFor() method from Dispatcher with dispatcherToken of the store you depend on and then get data from it through normal getter.
How to handle animations or touch events that are happening super fast?
Ideally use requestAnimationFrame to throttle.
Opinion on different libraries implementing Flux? Like FluxStore, ...
ReFlux - https://github.com/spoike/refluxjs - different in Dispatcher, no idea if it scales.
Importance of Immutable data?
Great for shouldComponentUpdate, where test is happening, if the new data (props & state) are different from old data. With immutable data, you can use just
How to handle erros?
Validation error - use error state
API call error - complicated with optimistic rendering