Have a large Backbone application that you'd like to try React on with the hopes of moving away from Backbone in the future? I'll guide you through some of the options and techniques you can do so without going crazy.
it stopped working that great.. • Numerous API calls & hydrations • Lot of useless re-rendering • Increased load times • Huge flame chart spikes • User complaints • Dedicating way too much time for render debugging & optimization • Patches weren’t doing the trick What could UI solve on its own?
gratification • Reusable, encapsulated components • Efficient diff’ing algorithm re-renders only what it needs to • Declarative style makes it easier to focus on the app itself • Less mental overhead of bringing in templates & views together For the first time, our backend’s were much more comfortable with our code
Backbone/React Mixin • Get familiar with the API • initialize = componentDidMount • remove = componentWillUnmount • Convert your parent view to use React.createElement instead Don’t freak out about the templates!
you can use it - use it. • Implicit returns - remember to wrap a series of components in a parent div, otherwise it won’t render • CJSX - Event handlers will need to `return false`, otherwise React will emit a warning Don’t freak out about the templates!