React components are reusable UI pieces that can be either function components or class components.
Function components are the modern way to write React components using hooks.
Components are the building blocks of React applications.
They can accept props, maintain state, and return JSX to describe what should be rendered.
// Function Component function Welcome(props) { return <h1>Hello, {props.name}</h1>; }
// Class Component class Welcome extends React.Component { render() { return <h1>Hello, {this.props.name}</h1>; } }