On Tue, Mar 15, 2016 at 8:00 PM, Alex Harui <aha...@adobe.com> wrote:
> > I just took a quick look at React. What is it you like about it? If it > is the actual UI library itself, I would have to wonder what it would take > to wrap up their UI Library so it could be used in MXML. The JSX I saw > seemed to have a lot of non-XML around it. > > We're using TSX, which is the TypeScript version of JSX. MXML is an XML file format with embedded ActionScript, while TSX is more like AS files with inline XML. React components are classes that define a render() function returning JSX elements which are actually used as a virtual DOM. It compares the new elements with the old and only updates what's necessary, so it's very efficient[1]. React does not have its own component library - you construct your own reusable components out of basic DOM elements, though there are many third-party components available. No pre-existing framework satisfies all of our needs and we require a lot of custom components, so it's a nice fit. Also, their philosophy matches our own, described well by a quote[2] I found through Google: React lets us write our UIs as a pure function of their state. > > This is a big, important idea. > > Right now we write UIs by poking at them, manually mutating their > properties when something changes, adding and removing views, etc. This is > fragile and error-prone. Some tools > <https://github.com/ReactiveCocoa/ReactiveCocoa> exist to lessen the > pain, but they can only go so far. UIs are big, messy, mutable, stateful > bags of sadness. > > React let us describe our entire UI for a given state, and then it does > the hard work of figuring out what needs to change. It abstracts all the > fragile, error-prone code out away from us. We describe what we want, > React figures out how to accomplish it. > > UIs become composable, immutable, stateless value types. React Native is > fantastic news. > Finally, though a bit off topic, here's a video that got me excited about React Native[3]. All these links are from when I first discovered React two years ago. [1] http://sixrevisions.com/javascript/why-i-ditched-angular-for-react/ [2] http://joshaber.github.io/2015/01/30/why-react-native-matters/ [3] https://www.youtube.com/watch?v=7rDsRXj9-cU