Components let you split the UI into independent reusable pieces and think about each piece in isolation.
A function component that accepts props:
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
can also use ES6 class:
class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}