Oprea.Rocks LogoLife between pen, paper and computer

Can I learn React.js if I don't know JavaScript?

Mountain Bike

I receive a notification from Quora. Someone had asked me to answer this question. At first, I was tempted to give the "Learn the language basics and then go for libraries" sermon. But I stood and thought for a moment. Since the time I used to obsessively preach that, I went through a lot of teams, mindsets and technology stacks. I saw that neither the teams or the businesses needed people who were experts at language fundamentals. They needed people who were Good Enough™️ with the language and they needed them to be productive as fast as possible.

They deliver working software to the business and in turn, the business trusts the team with the choices they make. This is how the team gets to experiment with new technologies and techniques, this is how they grow professionally and become experts.

Okay, enough introduction, here's my answer to the question "Can I learn React.js if I don't know JavaScript?":

Let me give you an analogous question that would clear things out for you:

Can you learn how to ride a mountain bike, uphill, if you don’t know how to ride a bicycle?

Now, let me answer the question for you.

Yes, you can! If you have a strong enough willpower, you will. What you will also end up doing, whether you like it or not, is to learn how to properly ride a bicycle. The only difference is that it’s going to be harder for you, because of your setup.

Instead of choosing to learn to ride the bicycle on a flat surface then try your luck going uphill, you’re learning to ride a bicycle uphill, straight off the bat. I’ve been in your situation before and I can’t tell you if it’s good or bad. Again, it all comes down to the amount of willpower you have and if you’re willing to push through.

At the end of it all, if you succeed, you might be more resilient than your peers who went on the classic route — flat surface then uphill.

Going back to React, I feel that alongside Vue.js, it is one of the few(popular) JavaScript libraries that actually require more JavaScript knowledge than actual “library knowledge”.

Unlike Angular, which kind of enforces its own way of doing things — The Angular Way ™️ — React.js requires you know how to use an HTTP library, to make AJAX calls. It is okay with you using a third party cookie manipulation library, and doesn’t require that you use some library-specific wrapper for it.

To summarize, it’s up to you how you approach the problem at hand.

From where I stand, you have two options.

The first one is to go head-first and learn React, live through the pain of not understanding certain JavaScript concepts and learn those along the way, in a somewhat more painful and cognitively demanding task. The advantage to this is that you can incrementally learn React and JavaScript concepts as-needed.

The second option is to take a more formal approach, learn the basics of the language, then learn to use the library. The disadvantage here being that you’ll only be productive with the library once you start learning the library. By that time, your colleagues who chose to walk the rougher terrain of the first path might be well ahead of you. The advantage of this approach is that you will be less frustrated because you don’t understand certain concepts. You will also probably have to stop to check the language documentation fewer times, since you will already know the basics of the language.

I've also answered tangential questions, in the past. If anyone is interested, here are the links to my answers on similar topics:

Good luck learning JavaScript and React!

Photo credits: Dai Williams_ATB2484