511 karma · joined December 14, 2012
React as an ecosystem is pretty fantastic but the React animation story is still pretty terrible unfortunately. "Portals" / "reparenting" is a majorly hacky way of getting an element from one part of the DOM to another, and even React Motion, which solves a few of the animation gripes, is hard to use, slow, and brittle in my experience. There just isn't a good substitute for the enter-update-exit selections that make up the core of D3.
My usual workflow is to get as much DOM building done in React as I can, with D3 filling out the tricky bits. D3's lifecycles and direct DOM manipulation are much more complicated to reason about than React, on the whole.
My day job is building big data visualization applications with lots of D3 and React, so I have a lot of opinions about this.
If you can get away with using CSS transitions or react-motion in your app, and you don't need D3's enter-update-exit selections, I feel React's declarative syntax is a much simpler mental model and is consistent with how the rest of my app works. But anything complex you'll need to drop out of React and build your DOM in D3, which has a very different notion of element lifecycles than React and doesn't allow you to reuse any of your other React components.
Aside from Duolingo (who have been there for ages) and Uber (who aren't really based there) what's so exciting about Pittsburgh?
[0] https://github.com/jashkenas/backbone/pull/3003
As others have pointed out, having a stable API is a wonderful thing for a vast majority of projects. Backbone is stable because its ideas are battle-tested and the concepts are all there. People are seeing less usefulness for Marionette / Chaplin / Aurora, and I don't think that's all that bad.
* Disclosure: I'm a core contributor to Backbone.
My point (downvotes aside) is that Polymer (or any UI library -- react, angular, whatever) is overkill for this type of application. Without digging too deep into their source, it seems like it could've been done easier and cleaner in vanilla JS and ThreeJS.
And for what? The mobile page is just a single button with an accelerometer listener and websockets / webrtc glue, it shouldn't need any of those. The desktop page is mostly Three.js for loading and rendering the textures, and also the communication with the phone. What advantage does Polymer have over just writing normal ThreeJS and some vanilla js?
What would be really awesome is if there was something similar to Chrome Dev Tools' "store as global variable" feature, so that I could edit props in the console and then pass back to React.
WeakMaps are only really useful when you don't control the referenced object's lifecycle. Even then, you can simply invert your map or check in your callback.