Dan, please clarify on the use cases of PureComponent other than stateless components. My understanding of PureComponent is that if misused, will slow down the application rather than making it faster. Since PureComponent will diff the changes before rerender.
Use PureComponent when you have performance issues and have determined that a specific component was re-rendering too often, but its props and/or state are shallowly equal.
Dan, please clarify on the use cases of PureComponent other than stateless components. My understanding of PureComponent is that if misused, will slow down the application rather than making it faster. Since PureComponent will diff the changes before rerender.
Use
PureComponent
when you have performance issues and have determined that a specific component was re-rendering too often, but its props and/or state are shallowly equal.reactjs.org/docs/optimizing-perfor...
Thank you for the clarification Dan.