-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

React Interview Guide
By :

Both elements and components are basic building blocks for creating React views or apps. It is easy to build a UI with isolated, customizable, and reusable components. The following questions and the content they cover will help you answer the basics of ReactJS and will act as a foundation for the next set of questions in this book.
A component is an independent, reusable code block that divides the UI into smaller pieces. For example, while building the UI part of a web application using the React library, you can break its UI into small pieces for reusability purposes, highlighted with blue boxes in the following figure:
Figure 2.2: React components
Each piece can be considered a component and is represented in a separate file instead of the UI being built in a single file. These components can be reused across the application wherever they are applicable.
Note
Each component...