3 ms·
>but note that then there’s no way of accessing updates values (in callbacks) This is by design. When you start making a component worry about what it needs to
by aphextron 5y ago
>but note that then there’s no way of accessing updates values (in callbacks)
This is by design. When you start making a component worry about what it needs to do on an update, rather than just rendering its data, you are introducing a whole new level of complexity. That's why class based React components could turn into these unwieldy confusing things where you never knew for certain what was going to render every time, because the shouldComponentUpdate method gets stuffed full of business logic.