React
React is a declarative, component-based JavaScript library for building user interfaces, maintained by Meta. It powers interactive UIs through a virtual DOM and unidirectional data flow.
§ 1 Definition
React is an open-source JavaScript library for building user interfaces, created by Jordan Walke at Facebook in 2011 and open-sourced in 2013. It is maintained by Meta (formerly Facebook) and a community of individual contributors. React lets developers compose complex UIs by assembling small, reusable components that manage their own state and render efficiently through a virtual DOM diffing mechanism. React is a library, not a full framework. It handles the view layer only and relies on companion libraries (React Router, form libraries, data fetching solutions) for a complete application architecture. React 19, released in December 2024, introduced React Server Components as a first-class feature, Server Actions for handling mutations, and automatic performance optimizations via the new compiler.
§ 2 Component Model
React components are JavaScript functions (or classes in legacy code) that return a description of what the UI should look like. Components accept inputs called props and return React elements describing the DOM structure. Components can be server components (rendered on the server with no client JavaScript) or client components (rendered and hydrated in the browser with full interactivity). The boundary between server and client is marked explicitly with the `'use client'` directive.
§ 3 Virtual DOM and Reconciliation
React maintains a lightweight in-memory representation of the DOM called the virtual DOM. When state changes, React generates a new virtual DOM tree, diffs it against the previous one (reconciliation), and computes the minimal set of DOM mutations needed. This diffing process is what gives React its performance characteristics: instead of tearing down and rebuilding the DOM on every change, React surgically updates only what changed.
§ 4 Hooks
Introduced in React 16.8, hooks are functions that let developers use state, effects, context, refs, and other React features inside function components. The primary hooks are `useState` for local state, `useEffect` for side effects, `useContext` for consuming context, and `useRef` for mutable references. Custom hooks allow developers to extract and reuse stateful logic across components.
§ 5 Note
§ 6 In code
```jsx
function Counter() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>{count}</button>;
}
```§ 7 Common questions
- Q. Is React a framework or a library?
- A. React is a library. It provides the view layer only. For routing, server-side rendering, and data fetching, you need additional libraries or a meta-framework like Next.js.
- Q. What is the difference between React and React DOM?
- A. React is the core library for defining components and their behavior. React DOM is the renderer that translates React elements into actual DOM nodes in the browser. React Native uses a different renderer for mobile platforms.
- React is a declarative, component-based UI library, not a full framework.
- Server Components (React 19) let components render on the server, sending zero JavaScript to the client.
- Hooks replaced class components as the standard way to manage state and side effects.
Atomic Glue builds modern, high-performance websites on React and Next.js. From interactive dashboards to marketing sites, our Milwaukee team uses React's component model to ship fast, maintainable UIs that users actually enjoy. Our website development services center on this stack because it delivers both developer productivity and end-user performance.
Get in touchReact is a declarative, component-based JavaScript library for building user interfaces, maintained by Meta. It powers interactive UIs through a virtual DOM and unidirectional data flow.
Category: Front End (also: Software Engineering)
Author: Atomic Glue Development Team
## Definition
React is an open-source JavaScript library for building user interfaces, created by Jordan Walke at Facebook in 2011 and open-sourced in 2013. It is maintained by Meta (formerly Facebook) and a community of individual contributors. React lets developers compose complex UIs by assembling small, reusable components that manage their own state and render efficiently through a virtual DOM diffing mechanism. React is a library, not a full framework. It handles the view layer only and relies on companion libraries (React Router, form libraries, data fetching solutions) for a complete application architecture. React 19, released in December 2024, introduced React Server Components as a first-class feature, Server Actions for handling mutations, and automatic performance optimizations via the new compiler.
## Component Model
React components are JavaScript functions (or classes in legacy code) that return a description of what the UI should look like. Components accept inputs called props and return React elements describing the DOM structure. Components can be server components (rendered on the server with no client JavaScript) or client components (rendered and hydrated in the browser with full interactivity). The boundary between server and client is marked explicitly with the `'use client'` directive.
## Virtual DOM and Reconciliation
React maintains a lightweight in-memory representation of the DOM called the virtual DOM. When state changes, React generates a new virtual DOM tree, diffs it against the previous one (reconciliation), and computes the minimal set of DOM mutations needed. This diffing process is what gives React its performance characteristics: instead of tearing down and rebuilding the DOM on every change, React surgically updates only what changed.
## Hooks
Introduced in React 16.8, hooks are functions that let developers use state, effects, context, refs, and other React features inside function components. The primary hooks are `useState` for local state, `useEffect` for side effects, `useContext` for consuming context, and `useRef` for mutable references. Custom hooks allow developers to extract and reuse stateful logic across components.
## Note
Common misunderstanding: React is not a framework. It is a UI library. You cannot build a production application with React alone. You need a router, a build tool, data fetching solutions, and often state management. That is why frameworks like Next.js exist. Another common mistake is assuming the virtual DOM is faster than direct DOM manipulation in all cases. It is the diffing strategy and batching that make React efficient, not the virtual DOM itself.
## In code
## Common questions Q: Is React a framework or a library? A: React is a library. It provides the view layer only. For routing, server-side rendering, and data fetching, you need additional libraries or a meta-framework like Next.js. Q: What is the difference between React and React DOM? A: React is the core library for defining components and their behavior. React DOM is the renderer that translates React elements into actual DOM nodes in the browser. React Native uses a different renderer for mobile platforms.
## Key takeaways
- React is a declarative, component-based UI library, not a full framework.
- Server Components (React 19) let components render on the server, sending zero JavaScript to the client.
- Hooks replaced class components as the standard way to manage state and side effects.
## Related entries
- [Next.js](atomicglue.co/glossary/next-js)
- [React Server Components](atomicglue.co/glossary/react-server-components)
- [Virtual DOM](atomicglue.co/glossary/virtual-dom)
- [Hydration](atomicglue.co/glossary/hydration)
Last updated June 2026. Permalink: atomicglue.co/glossary/react