Saketh Kowtha
Articles by @sakethk

Articles by @sakethk

Try to use functional component over class component in react

Saketh Kowtha
·Jul 15, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article
  1. Functional component are much easier to read.
  2. Class components are stateful while Functional are stateless.
  3. You end up with less code. Fewer lines = better performance
  4. It will get easier to separate container and presentational components because you need to think more about your component’s state if you don’t have access to setState() in your component
  5. Class component has lifecycle it has to run the lifecycle methods where functional components doesn't have any life c
  6. No need of this
  7. React dev team said that there may be a performance boost for functional component in coming versions.
Share this