One buzzy skill you’ll see pop up is “React JS.” But what is React JS? Is it another coding language? A software program? Or something totally different?
To answer your questions and get you up to speed with this valuable web developer tool, we’ve put together a handy What is React JS tutorial.
Table of Contents
- What is React JS?
- What is React JS Used For?
- Virtual DOM
- React JS Examples
- React JS Community Resources
- Should YOU Learn React JS?
What is React JS?
- Dynamic web content includes things like animated graphics, photo slideshows, and interactive forms.
- Anytime you visit a website where things move, refresh, or otherwise change on your screen without requiring you to manually reload a web page, there’s a very good chance JS is the language making it happen.
Note: readers often ask “is React JS frontend or backend?” The answer is: definitely frontend. You can keep this straight by remembering the “on screen” aspect of UIs—React is used exclusively for “client side” programming (building things that a user will see on screen in their browser window), which makes React JS a frontend library.
- Virtual DOM
To get an even better understanding of React JS and why you should use it, let’s take a look at both.
This isn’t just a matter of convenience, though—using JSX to update a DOM leads to significant site performance improvements and development efficiency. How? It’s all about the next React feature, the Virtual DOM.
If you’re not using React JS (and JSX), your website will use HTML to update its DOM (the process that makes things “change” on screen without a user having to manually refresh a page). This works fine for simple, static websites, but for dynamic websites that involve heavy user interaction it can become a problem (since the entire DOM needs to reload every time the user clicks a feature calling for a page refresh).
However, if a developer uses JSX to manipulate and update its DOM, React JS creates something called a Virtual DOM. The Virtual DOM (like the name implies) is a copy of the site’s DOM, and React JS uses this copy to see what parts of the actual DOM need to change when an event happens (like a user clicking a button).
Let’s say a user enters a comment in a blog post form and pushes the “Comment” button. Without using React JS, the entire DOM would have to update to reflect this change (using the time and processing power it takes to make this update). React, on the other hand, scans the Virtual DOM to see what changed after a user action (in this case, a comment being added) and selectively updates that section of the DOM only.
This kind of selective updating takes less computing power and less loading time, which might not sound like much when you’re talking about a single blog comment, but—when you start to think about all the dynamics and updating associated with even a slightly complex website—you’ll realize it adds up to a lot.
What Does React JS Code Look Like?
If all of this makes sense but you’re still wondering, “what IS React code?” you can get a visual idea of what React looks like straight from this React examples website. Each of the projects listed here gives an idea of what’s possible with React JS and a look at the source code used to build it.
Meanwhile, if you’re still wondering exactly “what can be done with React JS?” and you’re interested in React JS examples for beginners, these simple projects curated by the official React website provide React JS templates to walk through as you learn React JS.
And finally, if you’re looking for a React JS tutorial to go along with those React JS examples for beginners, you can go straight to the source with ReactJS.org’s Intro to React, a React JS tutorial that requires no previous experience or knowledge. Whether you’ve already been working with the React library, or you’re still at square one figuring out how to install React, this is a great place to start.
The React JS Ecosystem
- React code snippets and components (building blocks of React code used to create specific parts of a user interface)
- The option to use JSX to directly manipulate your DOM
- A Virtual DOM to improve your website’s performance
But on top of all that, React JS is an open source project, meaning anyone can download and modify its source code for free. This also means that, whatever specific UI function you’re hoping to address with React JS, there’s a React library to meet your needs. Your React library size can grow exponentially with React’s community curated library add-ons, ranging from collections of individual UI features to complete React JS templates for building UI’s from the ground up.
Should I Learn React JS?
If you want to work as a front end web developer (which means building UIs), the answer is YES!
Finding success in web development means using the right tools to make your code as effective and efficient as possible. And—when it comes to building user interfaces—React JS is a tool you need to know how to take advantage of.
Scott Morris is Skillcrush's staff writer and content producer. Like all the members of Skillcrush's team, he works remotely (in his case from Napa, CA). He believes that content that's worth reading (and that your audience can find!) creates brands that people follow. He's experienced writing on topics including jobs and technology, digital marketing, career pivots, gender equity, parenting, and popular culture. Before starting his career as a writer and content marketer, he spent 10 years as a full-time parent to his daughters Veronica and Athena.