3 ms·
Not sure this has much to do with OO vs Functional Hooks, more like reading the docs? OO lifecycle: constructor, render, componendDidMount, render, (render, co
by angelzen 5y ago
Not sure this has much to do with OO vs Functional Hooks, more like reading the docs?
OO lifecycle: constructor, render, componendDidMount, render, (render, componentDidUpdate, render)*
FH lifecycle: (renderFn, useEffectFn | (useLayoutEffectFn, renderFn))+
For more in-depth musing over the exact behavior, see, for example: https://reacttraining.com/blog/useEffect-is-not-the-new-componentDidMount https://reacttraining.com/blog/useEffect-is-not-the-new-comp...