Do stateless functions in React 16, have, compared to classes still a better performance?
Should we still differentiate between stateless function and classes for performance reasons only?
I did not see any performance benefits of functional components in React. In fact, if your component is pure, inheriting from React.PureComponent
gives less re-renders and, because of that, better performance. You can make functional components behave the same using pure from recompose, so it comes mostly to your preference - functional vs OOP.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments