React
ELI5 — The Vibe Check
React is a JavaScript library from Meta for building UIs out of components. It uses JSX — a weird mix of HTML inside JavaScript — and a Virtual DOM to update only what changed. It's the most popular frontend choice in the industry.
Real Talk
React is a declarative, component-based JavaScript library for building user interfaces. Developed by Meta, it uses a Virtual DOM for efficient updates, JSX for templating, hooks for state and lifecycle, and a unidirectional data flow. It's a library (not a framework) — you add routing, state management etc. separately.
Show Me The Code
import { useState } from 'react';
export default function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(c => c + 1)}>+1</button>
</div>
);
}
When You'll Hear This
"React is a library — you still need to choose a router and state manager." / "Everything in React is a component."
Related Terms
Component
A component is a self-contained LEGO brick for your UI.
Hook
Hooks are special functions in React that let function components use superpowers like state and lifecycle that used to be class-only.
JSX (JSX)
JSX is a JavaScript syntax extension that lets you write HTML-like code directly inside your JavaScript.
Next.js
Next.js is React's big sibling that adds superpowers like SSR, SSG, file-based routing, and API routes.
Virtual DOM
The Virtual DOM is a lightweight copy of the real DOM that lives in memory.