79613884

Date: 2025-05-09 10:04:51
Score: 0.5
Natty:
Report link

i had the same problem understanding the difference. Available examples in other communities are all about class components and they believe only class components are stateful due to their ability to manipulate states. But the truth is Functional components can be called stateful now because they ALSO can manage states using react hooks like useState() and useEffect() etc. So i prefer calling a component "stateful" if it has a state in it and can make changes on it, and call a component "stateless" if it only recieves the data(states) through it's props.

Reasons:
  • Whitelisted phrase (-1): i had the same
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Amin Salehi Fard