home development system design Linux databases Docker kubernetes about me contact
React

I've been using React for a long time. Here's my React story:

I've had an up-and-down relationship with React for a few years, but now I like it and use it for nearly all my front-end development.

I was developing an open source web app that was bi-lingual, so at the click of a button the whole site would instantly switch between English and Spanish.

The old way of doing this was to define a Context at the top level so that changes could apply to the whole app, not just to individual components and children. Passing changes to children wasn't working reliably anyhow. Then, two things happened: Context was deprecated, and JavaScript classes were introduced. Both seemed like bad ideas (and were later rescinded.)

I ported my app to the Surplus framework, which is a React work-alike with JSX and worked well. Here is the documentation I wrote for the project. Surplus has great benchmarks, but is mostly a one-person project and never seemed to get the popularity it deserved. I was concerned about its future. I then ported it to Inferno, which is a fork of React that used functions instead of classes for components, and played with other frameworks including some of my own.

Then in September 2018 I saw Dan Abramov introduce Hooks at the annual React conference. He described all of the problems that had driven me away from React in the first place, and how they had been addressed. I was surprised, and felt like my concerns had been noticed by others too. Around the same time "create-react-app" came out, which generates most of the boilerplate needed for an app, including code splitting and tree shaking to eliminate dead code. Plus, no more hand-fiddling with Babel and Webpack. So I'm back.

There are many other JavaScript frameworks that compete with React. Some thoughts:

If you use React for your projects, or are thinking about it, let me know. I'd like to help you.