React everywhere

9 May 2017
More and more, familiarity with React.js is required for contract web developers. It takes the mental hoop-jumping out of a lot of the day-to-day development tasks - and allows us to be more productive. Is there a cost to this?

"React - A JavaScript library for building user interfaces" - it's a pretty good thing. It encourages an approach to developing interfaces that takes much of the mental hoop-jumping out of our day-to-day development tasks. It allows us to be more productive and creative. We get more reliable code than we could with jQuery-event-DOM-AJAX-eventlistener-spaghetti. Win. Win. Win. This is what libraries and frameworks should do for us, and React does it well.

My experiments with React have been rewarding. I enjoy writing apps with React - it suits my way of subdividing problems into smaller modular pieces and recomposing them as a whole. The functional programming paradigm it encourages is well suited to what we do as web developers - and exposure to React and the thinking behind it has been educational and rewarding for most web developers I know. It can open opportunities.

React is a success - in no place more than the contract developer job market. So much, that it threatens to overshadow other viable alternatives and skills for web developers. By becoming a de facto standard for interface development for the web, for mobile and VR, I am sensing an assumption among managers and recruiters that JavaScript is React. We've seen it happen in the past with jQuery - which was similarly enabling and educational for developers, but as a single dominant tool, was ultimately limiting. (See jQuery considered harmful | Lea Verou). I recognise the pattern from the rise and fall of Flash and ActionScript - which at the time exposed computational capabilities to creative and artistic contibutors who were left high and dry with the emergence of mobile and no place to go.

I've been observing the React bandwagon for a while now with a view to jumping on. But utimately bandwagons are not my thing. Like the many libraries and frameworks before it, React is just one of the options out there. Right now Vue.js is a viable alternative, among the many others blooming daily, that solve similar problems. And still more will be created to solve the unique problems we have yet to encounter. Right now I'm watching Svelte • The magical disappearing UI framework.

A dominant paradigm, no matter how good it is, will not solve every problem. Sometimes the answer lies outside the popular patterns, framework or language everyone is using right now. Developers must learn to solve deeper problems and understand what lies beneath - and a job market that expects a narrow skill set will produce shallow developers.

Single framework dominance is meta-level code smell

Right now it's React. But utimately it's JavaScript and more ultimately it's all computational - and further even more ultimately - it's about how people, machines and data interact. React can serve us well for the problems React is good at helping us solve. But to rely completely on a single tool will limit possibilities to the capabilities of that tool, and train us into a particular way of thinking. We will be out of capable skills when new problems present themselves.

Learn React. Use React. React is good for right now. If you're a web developer you most likely need it right now. Many freelance contracts I see now currently require and assume knowledge of React. I do think React is a genuine and worthy tool to know - but not to the exclusion of others.