If you follow the frontend tech scene on Twitter you have probably noticed that every once in a while some topics like React or CSS in JS trigger open-ended, long debates and arguments on the validity and approachability of such technologies.
Often such arguments don't have any resolution or constructive outcome as each part has valid reasons to defend their claim and the counter part fails at seeing their point or empathise.
Is React really hard to learn though? Yes and no. In this blog post I will try to explain why.
Yes, it is!
Many of us learn new things on the job: hands-on new tech and problems are a good way to acquire knowledge.
Sometimes though, learning on the job is like changing a tire while the car is running.
Learning overlaps with the time budget that we have allocated to complete our task and get the job done. Having to do both can be the most overwhelming thing!
Usually we want to go from A to B, but we don't know how! For sure we would be able to do the same with another language or framework that we already know but that's not the case and this leads to frustration.
For example occasionally at work I get to write some Elixir and I often spend a good amount of time trying to figure out how can I do X or Y with it.
Like many other technologies, React solves many problems in a brilliant way but the initial discomfort and lack of knowledge might lead us thinking that it is just unnecessary hyped tech or even useless, overengineered and bad.
The fact that React is not a full blown framework then forces developers to make a lot of decisions that can be a (temporary) blocker for many.
Learning React can beuncomfortable if you are new to it and don't have the necessary amount of time or patience to familiarise with it but so is anything else and I personally think that in the long term it is worth the effort.
Overcoming discomfort is often necessary to unlock new opportunities and we shouldn't let it stop us from trying new things and rush to premature conclusions.
If you are a developer advocate or a tech influencer you may want to keep in mind all the above and address this type of audience when you advocate for a technology rather than targeting your (already) loyal one.
No, it is not!
The other side of the story is that React is not that hard to grasp after all.
A React application is itself a component that is attached to a container in the web page.
This is all I knew before I took my first React job.
What made it easy for me was the fact that I could assimilate the basic knowledge for fun in my spare time without the pressure of having to get the job done.
When I had to use React at work the other crucial bit for me was the fact that the development enviroment was already set up: other engineers had configured webpack, Babel etc.
Due to its large adoption there is a vibrant community around React, with plenty of places where you can ask for help and pre-configured frameworks like Next.js or Create React App, which can lower the barrier to entry.
The React website has even a quick guide called Add React in One Minute that will help you get started in ... well, one minute 😅
Often people express their thoughts or discomfort publicly without wanting to start a weekend-long debate, drama or, worse, attack and shame other folks – Brad Frost wrote a blog post about this topic and I highly recommend to read it.
Learning something new like React could be intimidating and hard, especially when you don't have the chance to do so for fun and take all the time you need to get comfortable with a that technology.
It is good to keep in mind that whether you can do this or not is not the technology's fault.
React is pretty good at what it does and in the right situation even easy to learn.