Introduction
This lesson will provide you with information on what React is, its brief history, and why we’re choosing to cover it in our curriculum.
Lesson overview
This section contains a general overview of topics that you will learn in this lesson.
- Understand what React is.
What is React?
According to the React website, React is “The library for web and native interfaces.” However, let’s break this down a bit further.
Generally speaking, a JavaScript library is a collection of pre-written code that’s designed to make development easier. This code can be reused/reimplemented in our own codebases to achieve complex tasks.
A library should not be confused with a framework, even though the terms are often used interchangeably. You’ll read about differences between libraries and frameworks later on in the lesson.
React provides powerful primitives (built-in functions/modules) that allow us to build user interfaces of varying complexities. Throughout this course, we’ll learn all about the functionality React provides and learn to build cool applications.
Why cover React?
React is one of the most powerful, widely used JavaScript libraries.
The landscape for frontend frameworks has been changing a lot over the last few years, so it’s understandable to be worried about choosing the “wrong” one. This article on the lifecycle of JavaScript frameworks shows the recent development of frontend frameworks well.
Once you start diving deeper into a framework, you’ll begin to love it. It makes your code easily scalable, more readable, and possibly a thousand times more efficient (in our modest estimation).
To name a few reasons to learn React:
- Components are reusable.
- It’s well-supported due to its popularity and large community.
- It’s not opinionated, which means it won’t force you to follow any specific design patterns, project organizational structure, or logic. It’s all up to you.
- There’s a smaller learning curve, especially if you already have a good grasp of JavaScript, HTML, and CSS from our previous lessons.
Assignment
-
If you haven’t already, browse through the React Website. Don’t go too in-depth or dive into documentation, but do read the introduction/homepage to get an idea of how React works.
-
Glance at this article which outlines the history of React.
-
Read this FreeCodeCamp article discussing the differences between a JavaScript library and a framework.
-
Lastly, skim this article which explains the main advantages of using React.
Knowledge check
The following questions are an opportunity to reflect on key topics in this lesson. If you can’t answer a question, click on it to review the material, but keep in mind you are not expected to memorize or master this knowledge.
Additional resources
This section contains helpful links to related content. It isn’t required, so consider it supplemental.
- If you are interested in learning more about React’s history, check out this documentary on React’s origin story by Honeypot.