Masha Reko - Apprenticeship Blog

What we have to learn to do, we learn by doing. (Aristotle)

Day 17: REACTing to Change

Today I continue in the same spirit as in the previous post: with my obvious fascination for React.

I’ve always regarded myself as a backend engineer, rather than a frontend one. The thing is, when I started learning about software development, frontend mostly came down to pure HTML and CSS, which I hated with a heat of a thousand suns. I could never find joy in it, just pure frustration (with the margins misbehaving, divs floating to weird places, text refusing to align, and so on). Backend, on the other hand, I loved. Simply, that’s where all the magic happened.

Nevertheless, things changed over the past couple of years, with the emergence of Angular, React, and many other frontend technologies that made UI development easier and more enjoyable. I kept hearing about these technologies here and there, which greatly sparked my interest, but I never got around to actually trying them out. Unfortunately, as good as University is for some things, it doesn’t leave you much time and energy to learn stuff that are not in the syllabus.

But now, there is no more University, and thus - no more excuses.

A few weeks ago, I came across a quote by Stewart Brand, where he says the following: “Once a new technology starts rolling, if you’re not part of the steamroller, you’re part of the road.” I have no desire to become a part of the road, especially not at the very beginning of my career. Therefore, it was time to accept that things have changed in the world of frontend, and finally adapt (or react) to those changes.

Even though I plan to eventually take a look at other technologies, my first stop was React, a JavaScript library for building user interfaces, initially released by Facebook in 2013. Even though 5 years is a lot of time, especially in the software context, React is still regarded as one of the most popular frontend technologies on the market. I think its simplicity is mostly the one to thank; as well as its concept of components that makes websites as efficient as ever.

Basically, the trick is to break each view into multiple components that can have their own state, as well as accept props as input data from other components. Every component implements a render method, that uses JSX syntax (extension of JavaScript) to describe what to display. Finally, React uses a so-called virtual DOM (Document Object Model), that follows the state of each component and re-renders only those that are actually changed.

Finally, React can work well with any technology stack, without the need to modify the existing code. With the help of Node.js, it can also render on the server, while React Native can be used for mobile applications - regardless of the operating system they run on.

All in all, I can say that this backend engineer is starting to love the frontend in ways I thought were imposible - all thanks to React. It was so much fun playing around with components and seeing how they change and communicate with each other, that I completely forgot about my frustrations with CSS. I am not sure I will ever completely switch gears to the frontend, but I definitely feel more complete as an engineer and software crafter, now that I learned this technology. Not that my word would mean much, and not that others haven’t said so before, but I wholeheartedly recommend you to try it, if you haven’t done so already.

Remember: be the steamroller, not the road.