Thoughts on React as It Relates to My Robot

I like when something can be understood in a few hours. I like when minimal work makes me feel like an expert. We all do.

I get that with React. Previously, I’ve been a huge fan of Knockout. They both do what I want: a nice way of decoupling how the user views things and the internal state. I still have to refresh my mind when people start talking about different model views viewing models of controller’s views of controller models. I’m not beholden to one ideology other than I view Angular as an uncontrolled mess. So much hidden magic that would take months to grok.

Both React and Knockout instead follow a more UNIX-like mentality: address a narrow issue and do it well. They’re not likeĀ Angular’s impersonation of Tetsuo absorbing everything like a high-class parody of Trapper Keeper. If you have an internal state, and want the DOM to reflect that, then React and Knockout have you covered.

Another thing I like about React is how it maps pretty well to the way I already think in terms of code. It’s like giving me a shorthand way to write down my thoughts. Time will tell if this honeymoon phase fades, as it did with Knockout.

I’m a bit ambivalent at using the latest and greatest JavaScript features. With Knockout, I can write vanilla JavaScript and know it’ll work on every browser out there. With React, it looks like some preprocessing could get in the same neighborhood. Painful memories of yesteryear related to getting source maps working in browsers still haunt me.

Reservations aside, I’ve started using React for my robot’s UI redesign. Since I’ll need to support a variety of robot configurations, I want something to make the development as simple and clean as possible.

React looks to fit the bill.