react-lifecycle-methods-diagram
react-lifecycle-methods-diagram copied to clipboard
Missing componentDidCatch
And also getDerivedStateFromError will be available in v 16.6.
Both are available now, any chance of getting the diagram updated?
Both componentDidCatch
and getDerivedStateFromError
are kinda "on the side" of component lifecycle. Could be listed somewhere next to the chart, but I don't think they belong to any place on the actual chart.
@wojtekmaj Actually I think they does belong to 'less common lifecycles'. IMO one of the goals of this diagram is to help people understand the execution sequence of lifecycle methods. At some point, we would wonder when componentDidCatch and getDerivedStateFromError are executed.
At some point, we would wonder when componentDidCatch and getDerivedStateFromError are executed.
Hopefully, we wonder first, then implement. ;) While Brian Vaughn has explained those methods in depth here, this diagram is great at illustrating what he describes and so I think it would be helpful to also have these two in there.