5 min read
•Question 3 of 48easyComponents and Props
Building blocks of React applications.
What are Components?
Components are independent, reusable pieces of UI. They accept inputs called props and return React elements.
Types of Components
Function Components (Recommended)
Simple JavaScript functions that return JSX.
Class Components (Legacy)
ES6 classes that extend React.Component.
Props
Props are read-only inputs passed from parent to child components. They make components reusable and dynamic.