What are stateless components in ReactJS?

If the behaviour of the component is independent of its state then it can be a stateless component. We can use either a function or a class for creating stateless components. But unless we need to use a lifecycle hook in our components, we should go for function components. There are a lot of benefits if we decide to use function components here; they are easy to write, understand, and test, a little faster, and we can avoid the this keyword altogether.