DEV Community

Cover image for How To Learn ReactJS in 2021
Nkenganyi Clovis
Nkenganyi Clovis

Posted on • Edited on

How To Learn ReactJS in 2021

As a passionate web developer, you must have come across the name ReactJS, you might have also tried to learn this library.

Let's start by asking the question...
WHAT IS REACT ??
According to the official React Documentation, React is defined as A JavaScript library for building user interfaces

As we know, in software development doing repetitive tasks is frustrating and developers always look for some framework or method to save their precious time. Here React comes into the picture.
React is component-based and it helps in building frontend pages and web applications in less time and that’s the coolest feature of this library.

Today in this blog we are going to list down the key skills that are needed to become a proficient React Developer.

  1. Learn the Fundamentals of HTML, CSS, and JavaScript

You should understand the base before moving on in learning this JavaScript library.
Understand the basic building blocks of the website. How HTML, CSS, and JavaScript work. This is because these skills a very vital before you start learning and fully understand React.
Most React features are inherited from JavaScript, so it's good to have a solid foundation in JavaScript. Some of the most used and essential Javascript concepts that are used in React include

  • Variables, objects, arrays, functions, and classes.
  • Common array methods such as .map(), .filter(), .reduce()
  • ES6 features such as arrow function, let, const. Learn about ‘this’ keyword, call, apply, and bind method.
  • Concepts of Asynchronous JavaScript such as promises, callback, Async/Await.
  • Learn how DOM (document object model) works. How to create, select, and update the HTML elements and their attributes.

2. Fundamentals of Node JS

As part of being a React Developer, you will have to do a lot of NPM scripts/commands which I consider any software developer will be very familiar with especially when working with most JavaScript frameworks.
You should have knowledge of NPM (Node package manage). NPM is used to install the Node modules and packages. Learn how to use the basic commands/scripts to install the packages and modules.
When learning React, you will also need to understand the import and export keywords which is also a very essential concept in React to utilize the installed node modules.

3. Learn React Fundamentals
Once the above concepts are clear and you have become confident with JavaScript, jump to the React Fundamentals. Learn the core concepts of React. React is based on component-based architecture. You will have to divide the complete UI or JSX into reusable components.

You will be creating different components for different tasks and these components will be fitted into the parent component. This parent component will be rendered to the user.

Now the question is…what are the core concepts you should learn in ReactJS. Let’s discuss that…

  • You will be using JSX syntax in ReactJS.
    The syntax of JSX is somewhere similar to HTML but keep in mind that it is different from plain HTML.

  • Learn to render the JSX elements. Show and hide elements depending on the conditions.

  • Learn the concept of State in ReactJS How does it work? Basically, the state holds the synchronous variable, and changing the value of the state will be reflected in the whole application wherever it is used. Learn how to store and update the data in State.

  • In React, you will be using props (Hey! What it is actually? ). We know that this might be a new word for you. Basically, props are just like the arguments passed to the function or method. Know when to use it and how to use it. You will be using props as an input argument to the HTML tags.

  • Functional component, class component, and the difference between both of these.

Just like in JavaScript, you will handle events in React. Learn how to handle some common events such as onClick, onChange, and onSubmit (You will be using these events in buttons, inputs, and forms).

NB: The React official tutorial will help you a lot to understand everything about React.
When you understand the basic concepts, then go-ahead to build projects from scratch on your own.
You can build projects such as...

  • Simple calculator app
  • Simple todo-app
  • Build a shopping cart

4. Styling in React
In development most of the time, we use plain CSS to give styling to our application. But in React mostly developers use the Component library for easier styling. There are many component libraries available to use but the most popular ones in React are Material UI and Bootstrap.

There is even what we call Reactstrap, which is like bootstrap main for the react library

You can also use the utility class library such as Tailwind CSS to style your element.

5. React Router

React developers use a third-party library called react-router-dom to create links for different pages, to load the content of different pages, and to redirect to other pages.
Below are some common features of react-router-dom you should know about to work with your application.

How to use , and components.
How to do navigation using the component and using the useHistory() hook.
Creating dynamic routes using the path prop i.e. and getting the path values using the useParams() hook.
How works in React Router.

6. React Hooks
So you’re done with the basic building blocks and React fundamentals. Now it’s time to learn React Hooks. This new feature was added in React version 16.8. With the help of React Hooks, you can write the React features without using the classes. React hooks allow you to write less code and that makes your app efficient, simpler, and powerful.

You will be working on mainly 5 core concepts of React Hooks. These five core concepts are given below:

useState: Most of the time in your React app you will be using this concept to store and manage the data.
useEffect: You will be using this concept in actions like HTTP requests and working with the Browser API.
useRef: This will be used to reference JSX elements.
useContext: This property of React Hooks will be used to access data from React Context to share data among components easily (instead of passing props)
useReducer: This concept in React hooks will be used to store and manage data across multiple components.
We have discussed only 5 hooks that are important to learn. There are more than 5 hooks but that’s not needed initially in your learning phase. As you will progress and you will encounter problems in your application, you will be learning more hooks slowly.

7. Redux
In your React application, you will have to manage the states. Once your application will start growing it will become a complex application and you will have to manage the states across components.
Redux which a powerful JavaScript library solves this problem and helps in maintaining the state of the application. In Redux, you store all your states in a single source.
You can learn more about Redux in the Official Redux tutorial.

8. Learn to Work With the APIs in React Apps

We know that React is a front-end library to build the user interfaces. A user interacts with the frontend part of the application, access the data from there, or navigate from one page to another page.

React interacts with the backend code of the application. We get the data from the backend part of the application, we perform actions such as authentication, display the item to the user, searching, registration of the user, etc.

Mainly there are two ways to work with the data from the backend. The most common and standard way is using the REST APIs. The other and the newer one is GraphQL API. In your work, you will encounter problems where you will have to work with both of the APIs. Learn how to work with both kinds of APIs using React.

I hope I have run you down on the main concepts or what you need to be successful on your journey in learning React and becoming a React developer.
The more you keep working on projects with React, you will encounter difficulties and this will help you to learn new skills and 3rd party libraries in React that will help you solve your problem

Promotions Below:......... 👇️👇️*

NB: You want your website to rank top on all search engines, get the best Plugin for SEO, RankMath

NB: If you are a WordPress Developer looking for an excellent Page Builder for WordPress, consider choosing Elementor

Check out my blog @ Positive Vibes Media to get the latest gist in the world of Web Development, Digital Marketing and related kinds of stuff

If you like this article, please like, comment and share and make sure to follow me on the following platforms:
LinkedIn
Github

Top comments (2)

Collapse
 
ptrjsn profile image
Peter Johnson

I liked this article--it's a good overview of React & some of the related technologies. Keep it up!

You're the first developer I've encountered from Cameroon. Glad to see you on Dev! You should consider joining Twitter & following some development accounts there; that's where I found this article several days ago, & the @thejsdev account will mention you to their thousands of followers if it can find your Twitter name.

Collapse
 
clovissocial profile image
Nkenganyi Clovis

Thanks so much for the encouragement. I truly appreciate