Chapter 1An Introduction to Components

React helps you build dynamic web applications by automatically updating the DOM when your data model changes. On top of updating the DOM, React lets you iterate on the interface by combining, expanding, and moving around self-contained elements, until you’ve hit the right design. These self-contained elements are called components.

Every application contains buttons, text inputs, labels, legends, and so on. Instead of building the user interface from single HTML elements like <div> or <p>, and manipulating these elements one at a time when you need to apply some changes, you first group single elements into components. Then you build the whole page by combining the components. Components are like custom ...

Get React for Real now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.