Try to use functional component over class component in react
sakethk
Posted on July 15, 2021
- Functional component are much easier to read.
- Class components are stateful while Functional are stateless.
- You end up with less code. Fewer lines = better performance
- 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
- Class component has lifecycle it has to run the lifecycle methods where functional components doesn't have any life c
- No need of
this
- React dev team said that there may be a performance boost for functional component in coming versions.
💖 💪 🙅 🚩
sakethk
Posted on July 15, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.