ReactEasy
What is React?
React is an open-source JavaScript library for building user interfaces out of reusable components. You describe what the UI should look like for a given state, and React updates the screen efficiently when that state changes.
Core ideas
- Components: functions that return UI (JSX). Small pieces compose into whole apps.
- Declarative: you write "for this data, show this", not step-by-step DOM instructions.
- State and props: data flows down through props; components re-render when their state changes.
- One-way data flow: parents pass data to children, children notify parents through callbacks.
- Learn once, write anywhere: React DOM for the web, React Native for mobile, plus servers via Server Components.
Where React is today
- React 19.3 (September 2026) is the latest version. React 19 added Actions,
use,useOptimisticanduseActionState. React 19.2 added<Activity>anduseEffectEvent. React 19.3 made View Transitions and Fragment refs stable. - React Compiler 1.0 (October 2025) automatically memoizes components.
- Server Components let components run on the server, used by frameworks like Next.js and React Router.
- Governance: since February 2026, React, React Native and JSX are owned by the React Foundation under the Linux Foundation, not by Meta alone.
Library, not framework
React handles rendering. Routing, data fetching and bundling come from frameworks (Next.js, React Router, Expo) or from tools like Vite. The React docs recommend starting new apps with a framework.
Code example
tsx
1// A complete React component: state + event + declarative UI2import { useState } from "react";34export default function Greeting() {5 const [name, setName] = useState("");67 return (8 <div>9 <input10 value={name}11 onChange={(e) => setName(e.target.value)}12 placeholder="Your name"13 />14 {/* React re-renders this whenever `name` changes */}15 <p>{name ? `Hello, ${name}!` : "Type your name"}</p>16 </div>17 );18}1920// Mounting it (React 18+ API)21// import { createRoot } from "react-dom/client";22// createRoot(document.getElementById("root")!).render(<Greeting />);
Practice this question
Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the React set.