Component-based architecture in React is a way of building a user interface as a tree of independent, reusable components, each responsible for a piece of the UI and its behavior, rather than as one large page-level script that manipulates the whole screen. The component is the primary unit of composition, reuse, and reasoning in React; props, state, and the parent–child tree are how those units communicate and coordinate.

The idea is easy to state and easy to misapply. “Component-based” does not mean “split everything into tiny files,” nor does it mean components are automatically decoupled or reusable. The architecture is a set of decisions about boundaries, data flow, ownership, and composition. This article explains what those decisions are, how React’s model actually works, where the common confusion comes from, and what the term does and does not guarantee.

The core idea: UI as a tree of components

In React, you describe what the interface should look like for a given set of data. A component is typically a JavaScript function that returns elements describing part of the screen. React calls these functions and reconciles the returned tree against the previous one to update the DOM efficiently.

A minimal example makes the shape concrete:

UserCard does not know or care how Avatar renders its image. It passes data down. Avatar does not know where user came from. That separation is the architectural payoff: each component has a narrow contract, and the parent composes children.

Three properties define the model in practice:

Composition over inheritance. React favors building complex UI by nesting components and passing children or render functions, not by subclassing a base component. You extend behavior by wrapping and combining. Unidirectional data flow. Data generally moves down the tree through props. Events and callbacks move information back up. A child does not reach into a parent and mutate its data. Local reasoning. A well-bounded component’s behavior should be understandable from its props, its own state, and the code inside it, without tracing the entire application.

What a component actually owns

The most useful architectural question is not “how small should a component be?” but “what does this component own?” Ownership usually falls into a few categories.

Rendering ownership. The component decides how a region of the screen is structured and styled. A PriceTag owns currency formatting and layout; its parent decides which product’s price to show.

State ownership. A component owns state when that state is genuinely local: whether a dropdown is open, what a user has typed into an uncontrolled field, which tab is selected. State that multiple distant components need usually belongs higher in the tree or in a dedicated state layer.

Behavior ownership. A component may own interaction logic, such as keyboard handling in a combobox or drag behavior in a sortable list. This is where composition gets interesting: behavior can be packaged in a custom hook and reused without forcing a particular visual structure.

Consider the distinction between these two components:

Toggle owns its own state; ToggleView is controlled by its parent. Neither is “more component-based.” The first is convenient when the state is private; the second is necessary when another part of the UI must read or change the state. Confusing these two patterns is one of the most common sources of tangled React code.

Props, state, and the direction of data

Props are inputs passed from parent to child. They are read-only from the child’s perspective; a component must not mutate its props. State is data a component manages internally across renders and changing it triggers a re-render.

The architecture becomes legible when you can answer: for any piece of data, who is the source of truth, and who receives it as a prop? Common failure modes follow directly from getting this wrong:

Prop drilling. Passing a value through many intermediate components that do not use it. This is not always a problem; shallow drilling is often clearer than alternatives. It becomes a design smell when unrelated layers must change whenever a deep value changes. Duplicated state. Two components each keep a copy of the same value and drift out of sync. The fix is to lift state to a common ancestor or centralize it. Derived state stored as state. Keeping a computed value in state instead of computing it during render creates synchronization bugs. If fullName is always ${first} ${last}, compute it; do not store it and update it in an effect.

React’s official guidance is to keep state minimal and derive what you can. That is an architectural rule, not merely a style preference, because every stored copy is a thing that can become stale.

Composition patterns that shape the architecture

React supports several composition techniques, and knowing which to reach for clarifies what “component-based” means beyond simple nesting.

Children as slots

children lets a parent pass arbitrary content into a layout component:

Panel controls structure and styling; the caller controls content. This is often better than adding many boolean props like showHeader, headerPosition, and headerColor, because the caller composes rather than configures every variation.

Render props and function children

Passing a function as a prop or child lets a component share logic while the caller controls rendering. This pattern predates hooks and remains useful, though hooks have replaced many of its uses for sharing stateful logic.

Compound components

A set of components designed to work together, such as a Tabs, TabList, Tab, and TabPanel, shares implicit context so the caller can compose them flexibly. The architecture trade-off is that the parts are coupled by design; they are a unit even though they are separate exports.

Custom hooks

A custom hook extracts reusable behavior—useLocalStorage, useDebouncedValue, useFormField—without imposing a component structure. This is a crucial distinction in React: reuse of behavior and reuse of rendering are separate concerns. A hook can be reused by components with completely different markup. Historically, higher-order components and render props often coupled the two; hooks reduced that coupling.

Presentational and container components: useful vocabulary, outdated rule

The terms “presentational” and “container” components were popularized in earlier React literature to describe separating appearance from data fetching and logic. The distinction is still a useful way to think: some components are mostly about markup and styling, while others coordinate data and behavior.

But it is not a law, and treating it as one produces awkward code. A component that fetches its own data is perfectly reasonable in many applications; server components and data-loading patterns have further shifted where fetching lives. The enduring principle is separation of concerns, not a rigid two-category taxonomy. A component that both fetches and renders is not automatically badly designed; a component that mixes unrelated responsibilities—say, authentication checks, analytics tracking, price calculation, and three different layout modes—usually is.

Where the confusion comes from

“Component-based” is not unique to React. Angular, Vue, Svelte, and others also use components. What varies is the details: how change detection works, how state is managed, and what the component compiles to. Saying “React is component-based” describes a shared family of approaches, not a React-only property.

A component is not necessarily a web component. The Web Components standard (custom elements, shadow DOM, templates) is a browser-level technology. React components are a framework abstraction that typically render to DOM elements. They can interoperate, but they are not the same thing, and React does not require custom elements.

Components are not automatically reusable. Reusability depends on a clean contract: sensible props, no hidden dependency on global state, and no baked-in assumptions about its surroundings. A component that reads from a specific Redux slice, assumes a particular CSS class hierarchy, and calls a specific analytics function is a component, but it is not portable.

Smaller is not always better. Over-fragmentation—dozens of one-line wrapper components with names like UserCardWrapperInner—adds indirection without adding clarity. The right boundary is usually where a piece of UI has a coherent purpose and a stable interface. Splitting further should serve comprehension, testing, or reuse, not a rule of thumb.

The tree is not the same as the file structure. Components can be grouped by feature, by route, or by type. React does not mandate a folder layout. “Component-based architecture” describes runtime composition; project organization is a separate decision.

What good component architecture looks like in practice

A few concrete habits distinguish a healthy React architecture from a merely component-shaped one.

Clear public interfaces. Props should be named for meaning, not implementation. Accepting a user object is often clearer than accepting userId, userName, and userAvatarUrl separately, but a broad object prop couples the child to the parent’s data shape. There is no universal answer; the point is to choose deliberately.

State as close as possible to where it is used, but no closer. Lifting state too high makes the whole tree re-render and complicates passing props. Keeping it too low means siblings cannot share it. The correct home is the lowest common ancestor of everything that needs it.

Boundaries that match change frequency. Code that changes together should live together. A checkout summary that changes whenever pricing rules change should probably own its formatting logic rather than scattering price math across several components.

Composition at the edges. Prefer passing content in over adding configuration flags. A Modal that accepts children and a footer prop is more flexible than one with twelve boolean props controlling internal variants.

Testing follows boundaries. A pure display component is easy to test with a few props. A data-coordinating component is tested with mocked data sources. The component boundary becomes a testing seam.

A compact illustration of composition versus configuration:

The second version has more parts but fewer modes. Each part is independently understandable, and new layouts do not require new boolean flags on Alert.

How this relates to broader React architecture

Component-based architecture is the substrate on which other React decisions rest. Routing, data fetching, state management, and styling all attach to components or to trees of them.

State management libraries exist because component-local state does not scale to every kind of shared data. Redux, Zustand, and similar tools centralize state that many components read. They complement component architecture rather than replace it. Server components and data loading move some rendering and fetching off the client. The component model remains, but the question of where a component runs and what it can access changes, so not every component is interchangeable between environments. Design systems are, in effect, curated component libraries with agreed contracts. A design system succeeds or fails on the quality of its component interfaces. Styling approaches—CSS modules, utility classes, CSS-in-JS—are mostly orthogonal. They affect how a component is styled, not whether the architecture is component-based.

Because this landscape changes, treat any specific library recommendation or version-specific API as something to verify against current documentation for your React version. The architectural principles—composition, unidirectional data flow, local ownership of state, clear contracts—have been stable across React’s evolution, even as the recommended tools around them have shifted.

Summary

Component-based architecture in React means structuring an interface as a tree of components with explicit inputs (props), owned local state where appropriate, and data flowing downward with events flowing upward. Its value comes from composition, reuse of behavior and markup, and the ability to reason about a piece of UI in isolation. Its limits come from the same place: components are only as decoupled as their contracts allow, smaller is not automatically cleaner, and the term says nothing by itself about folder structure, state management, or data fetching. The productive questions are always about ownership and boundaries—who holds the data, who renders what, and where change is likely to concentrate.