3 ms·
It will, but memo will prevent the actual function from being called as well.
by iaml 5y ago
It will, but memo will prevent the actual function from being called as well.
- wruza 5y agoIf the framework is based on pure functions and no external state, what is the point of calling the entire subtree again and again?
- iaml 5y agoIt's not calling entire tree, when you do any hook/state changes only that component and everything down is called. Also, it's still not doing any dom changes, although I'm not sure what kind of performance impact it has nowadays. As to why, I don't really know, but as a dev using react I sure enjoy that I don't have to worry about some component losing track of state.