How To Learn React JS Quickly
- the let and const keyword
- arrow functions
- template literals
- default parameters
- array and object destructuring
- for-of operator
- find method
- ES5 array methods
- ES5 JSON methods
- ES5 Date methods
- modules (import and export)
- async / await (not ES5 or ES6, but ECMAScript 2016)
2. Declarative programming vs. imperative programming
This one I didn't do when I was learning React. Because I didn't even know I was doing imperative stuff on my React projects for my portfolio, this bad practice made its way to my code. In one job interview, the interviewer himself pointed it out and told me how it's supposed to be done in React.
Bless his kind soul.
I didn't have time to correct my code, but I kept what he said in mind. In another interview at another company, the interviewer pointed out the same section in my code, and asked me what I think I did wrong. Since I remembered what the first interviewer said, I was able to answer this question correctly. The whole interview was more engaging because I was able to talk more about my code and point out what I could do to improve it. I got hired and work there until now 😉
To give you an example of these two different programming paradigms, take a look at exercise #5 at 9 Beginner React JS Exercise Problems
3. Read the docs
In any new library you've decided to use, never skip reading the documentation. If you're just learning how to code, this is what I recommend you to learn doing - reading and making sense of the documentation of anything you're trying to learn.
At work, you'll be using a lot of libraries. You have to get comfortable learning how to use libraries by reading their documentation. You just have to 😉
- Code right away
- Finally consult documentation
I used to skip reading documentation when I was a junior developer. I solely relied on Stack Overflow and tutorials. I was impatient and jumped straight ahead into coding after installing the libraries. This led to bad practices and lots of workarounds to force the library to do what I want. If only I read the docs, I would have implemented the logic better, because I knew the library better. No work arounds, no hacks.
You'll learn exactly how to use the library in different use cases, its features, limitations, and the creators' recommendations on approaching different scenarios.
If you don't believe me, here's my story:
We had a new hire that had the same years of working experience as me, who just learned React recently. Her past experience was Angular, and at this time I already had 1-2 years of experience in React.
Until then, I put so much importance in learning on the job. I thought everything you have to know for the job, you'll eventually learn ALL of it on the job.
But one time, I got blown away with her solution because I didn't know you could do it like that. When I asked her how she knew [insert whatever she did here. Sorry, I no longer remember what it was specifically], she said, "it’s in the docs".
While I was correct that you'll learn the ropes on the job, she learned more effectively because she read the documentation first, unlike me 🙂
I've been working with React for a while now, and yet I still learn new things about the library from time to time. And the first place I go to is the official documentation, because... lesson learned 😉
4. Start working on small, tiny projects
You know what they all say in the learn-to-code space - don't get stuck in tutorial hell. And the only way to get out of tutorial hell is to work on your own projects to apply what you've learned from those tutorials.
If you're having a hard time with your own projects, maybe they're too big. Start small, and then work your way up to more complicated projects.
I wrote a list of very basic React exercise problems just for this very reason.
5. Build bigger projects
Should you take courses?
Yes, the documentation is good for learning the concepts that come with the library. But after that, it's time to put theories into action and solidify what you've learned by making your own projects. That's what the crash course did for me.
If you're ready to work on big React projects after going through steps 1-4 above, I highly recommend tutorials or courses that cover medium to large-sized React projects that were released recently.
React is updated very frequently, so you want to avoid outdated and obsolete content. I made a curation of very good resources for React here: fullstackvault.xyz
TLDR? How to learn React js quickly
Third, read the documentation. In item no. 3, I made my case for the reason why. Skipping this step sets you up to learning React ineffectively and you might even develop bad practices like me.
Next, get out of tutorial hell by working on your own projects. Start small and then gradually move to bigger and more complex projects. A list of beginner exercises plus a repository of advanced projects are linked in items 4 and 5.
And finally, if you have any concerns or questions, I’m always happy to help 🙂 Just drop a comment below. Other than that, happy learning!