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 is React
What is React?
React according to their official website 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, not to be confused with frameworks however as you’ll be reading the differences later on in the lesson. This code can be reused/reimplemented in our own codebases to achieve complex tasks. That said, the terms library and framework are often used interchangeably, so don’t worry too much about the difference.
Similarly, 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 is 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 will begin to love it. It makes your code easily scalable, more readable, and possibly a thousand times more efficient (just our modest estimation).
Just to name a few reasons on why to learn React:
- Reusability of components
- Well supported due to its popularity and large community
- React is not opinionated, which means that it won’t force you to follow any specific design patterns, project organizational structure, or logic. It’s all up to you.
- A smaller learning curve, especially when you already have a good grasp of JavaScript and HTML/CSS from our previous lessons.
If you need more convincing, the recent 2023 StackOverflow Developer Survey should be reason enough to get excited about learning React. Still unsure? Check out this article on why you should learn React.
Assignment
-
If you haven’t already, browse through the React Website. Don’t go too in-depth and dive into documentation however do read the introduction/homepage to gauge an idea of how React works.
-
Read this FreeCodeCamp article discussing the differences between a JavaScript library and a framework.
-
Lastly, skim this in-depth article which explains the major benefits of using React.
Knowledge check
This section contains questions for you to check your understanding of this lesson on your own. If you’re having trouble answering a question, click it and review the material it links to.
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