### What is a stateless component?

#### Answer

A stateless component is a component whose behavior does not depend on its state. Stateless components can be either functional or class components. Stateless functional components are easier to maintain and test since they are guaranteed to produce the same output given the same props. Stateless functional components should be preferred when lifecycle hooks don't need to be used.

#### Good to hear

* Stateless components are independent of their state.
* Stateless components can be either class or functional components.
* Stateless functional components avoid the `this` keyword altogether.

##### Additional links

* [React docs on State and Lifecycle](https://reactjs.org/docs/state-and-lifecycle.html)

<!-- tags: (react,javascript) -->

<!-- expertise: (0) -->
