idev0085 / react-boilerplate

0 stars 0 forks source link

What are stateless components? #58

Open idev0085 opened 3 years ago

idev0085 commented 3 years ago

Stateless components are those components which don't have any state at all, which means you can't use this. setState inside these components. It is like a normal function with no render method. It has no lifecycle, so it is not possible to use lifecycle methods such as componentDidMount and other hooks.