A page built as one document works until it starts changing in many places at once. A catalog is filtered and the grid redraws. An item is added and a cart badge in the header must agree with a cart panel somewhere else. The same product card appears in search results, in a wishlist, and on a recommendations rail. In hand-built code, every one of those updates is the developer's personal responsibility, and the responsibilities tangle: change one place, hunt for the others, and hope none was missed.

React's founding answer is a different model of what an interface is. The screen is not a page to be manipulated. It is a tree of components, and each component describes one piece of it.

A component is a function, not a snippet

A component is an ordinary JavaScript function whose name starts with a capital letter — ProductCard, SiteHeader, PriceTag — that takes inputs and returns JSX describing its output. The capitalization is not decoration. It is how React distinguishes a developer's components from plain HTML tags.

That definition carries the real distinction. A component is not a reusable fragment pasted wherever it is needed. It is a function from inputs to interface. You do not go and change the page. You describe what each piece should look like for its current inputs, and React works out what must change on screen.

The tree matters more than any single component. At the top sits a root, usually called App, which renders a header and a main area. The main area renders a catalog. The catalog renders one card per product. When a product's price changes, you do not hunt through the document for every place that price appears. The price lives as data, flows into the components that display it, and each of those components re-renders from the new data. Get the tree right, and most later problems get smaller.

Finding the components in a screen you have never built

Start with a printed or sketched mock of the screen in front of you. First, draw boxes around every piece that has its own job and could be described in one sentence: the header, holding brand, navigation, and cart count; the filter bar, holding the search box, category choice, and sort choice; the product grid; the product card, holding image, name, price, stock note, and add button; the footer.

Second, name each box for the job, not the appearance: FilterBar, not BlueStrip; ProductCard, not RoundedBox. A name that states the job survives every redesign. A name that states the color or the shape has to be renamed the first time the design changes, and by then other code will already depend on it.

Third, apply two tests. The reuse test: if the same box appears more than once — the card appears dozens of times — it is certainly a component, parameterized by data. The change test: if a box changes for a different reason than its neighbors — the stock note changes when inventory moves, the price changes when a sale starts — that is evidence the box deserves its own boundary, because separate reasons to change want separate homes.

Fourth, keep the tree honest about containment. A component should render its children because it owns their arrangement, not because it happened to be written first. The grid arranges the cards. The card does not arrange the grid.

Two disciplines that keep a young tree healthy

The first discipline is that a component does one job at one level of detail. A ProductCard that also fetches the catalog, formats the currency for the whole site, and decides the page layout is not a component. It is the whole application wearing a card's name. When a description of a component's job needs the word "and" twice, split it.

The second discipline is direction. Components communicate through their inputs and their children, never by reaching sideways. A card does not go and find the header to update its count. Data flows down the tree as props, and events flow up as callbacks. A tree that respects that flow can be read from top to bottom. A tree that cheats it can only be debugged, because no reader can tell where a change came from or where it will land next.

These two disciplines explain why the snippet view fails in practice. Pasted fragments share nothing except appearance. When the underlying fact changes, each copy must be found and corrected separately. Components built as functions from inputs share the data itself, so one change in the data produces a consistent change everywhere that data is shown.

Start smaller than your ambition

Beginners tend to miss in both directions. First they under-split, producing one enormous App that renders everything and can be changed nowhere without fear. Then, stung by that experience, they over-split, producing forty components where no component holds enough behavior to justify its name.

The working standard sits between those errors: split when a piece has a nameable job, its own data needs, or a reason to change of its own — and not before. Boundaries can be refined later, once data and state give sharper tests for where they belong. What cannot wait is the core move itself.

That move corrects the common misconception directly. Components are not just a tidier way to write HTML, and they are not little reusable snippets to paste where needed. Tidiness is a side effect. The substance is the tree: see the screen, name the jobs, draw the tree, and let each component be a function from inputs to interface. A developer who works that way stops maintaining a page by hand and starts describing an interface that stays consistent because its pieces all render from the same data.

Experience it, don’t just read about it

Thinking in components — seeing the screen as a tree of functions from inputs to interface, not a page to manipulate is Concept 1 of Front-End Development with React: Components, Hooks and Real Interfaces (Course No. 330), from Cognosco Learning, a learning company powered by AI. The course builds the full work of building real interfaces beyond this distinction — Props — Data Flows Downhill, State with useState — Giving a Component Memory, and Rendering Lists and Keys — Identity in a Crowd — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.

Try a Free PreviewAll Signature CoursesThe Corporate License

Navigate your own course.

← All Insights

© 2026 Cognosco Learning. All rights reserved.