componentDidCatch(error, info) This lifecycle method is invoked after an error has been thrown by a descendant component.
error - The error that was thrown.
info - An object with a componentStack key containing information about which component threw the error.
componentDidCatch() is called during the “commit” phase, so side-effects are permitted.
It should be used for things like logging errors:
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience