#react
- The main difference between functional and class components is that functional components capture rendered value. In a functional component the execution is tied to that particularly render state.
- Consider a situation where we run an event handler that accesses the props and the props change before the handler completes
- In a class component the event handler would access the current updated props since react mutates the this object
- In a functional component the event handler would use the props of that particular render
---
https://dev.to/francodalessio/the-difference-between-classes-and-function-components-in-react-5964