React - Stateful Components and Stateless Components

Stateful Components and Stateless Components

Stateless Component

Definition

  • A JavaScript function that takes props as an argument and returns a React element - It has no internal state and does not need to remember or modify values

Advantages

  • Simplicity of code management

Example Code

Corrections will be incorporated with attribution.