DevAcademy
LearnReactReact Introduction
BeginnerReact

React Introduction

Understand what React is, the problem it solves, and how it changed the way developers build user interfaces.

Reading Time

10 min

Lesson

Lesson 1 of 42

What is React?

React is a JavaScript library for building user interfaces, created and maintained by Meta. It lets you describe what your UI should look like for any given state, and React handles efficiently updating the actual DOM to match.

The Problem React Solves

Before React, developers manually updated the DOM with methods like document.getElementById() and .innerHTML as application state changed — a process that becomes error-prone and hard to reason about as an app grows. React lets you describe your UI declaratively instead, based purely on the current state.

A Simple React Component

function Greeting() {
  return <h1>Hello, DevAcademy!</h1>;
}

export default Greeting;

Quick Facts

FeatureValue
Created ByJordan Walke at Facebook (Meta)
First Released2013
TypeJavaScript library for building UIs
Core IdeaDeclarative, component-based UI
Used ForWeb apps, and mobile apps via React Native

Declarative vs Imperative

Imperative code describes the exact steps to reach a result. Declarative code describes the desired end result, and lets the framework figure out the steps. React embraces the declarative approach — you describe the UI for a given state, not the sequence of DOM operations needed to get there.

Core React Concepts

  • Components — reusable, self-contained pieces of UI.
  • JSX — a syntax extension for writing markup inside JavaScript.
  • Props — how data flows into a component from its parent.
  • State — data a component manages and can change over time.
  • The Virtual DOM — React’s in-memory representation used to compute efficient updates.

Where React is Used

React powers everything from small interactive widgets to entire large-scale applications, and is the foundation for meta-frameworks like Next.js, which add server-side rendering, routing, and more on top of it.

React is a Library, Not a Framework

Unlike some competitors, React itself only handles rendering the UI — routing, data fetching conventions, and build tooling are provided by separate libraries or frameworks (like React Router or Next.js) built around it.

Best Practice

Make sure you’re comfortable with modern JavaScript (arrow functions, destructuring, array methods, modules) before diving into React — nearly all of React’s API is just JavaScript functions and objects.

Interview Questions

Quick Quiz

1. What is React?

2. Does React encourage a declarative or imperative style of UI programming?

3. Is React itself a full framework with built-in routing and data fetching?

Next