feat: Prints an error log for errors in child components render methods.

This commit is contained in:
Дамян Минков 2021-08-31 12:00:37 -05:00
parent b9866e3464
commit 5c299bcd46
1 changed files with 12 additions and 0 deletions

View File

@ -100,6 +100,18 @@ export default class BaseApp extends Component<*, State> {
this.state.store.dispatch(appWillUnmount(this));
}
/**
* Logs for errors that were not caught.
*
* @param {Error} error - The error that was thrown.
* @param {Object} info - Info about the error(stack trace);.
*
* @returns {void}
*/
componentDidCatch(error: Error, info: Object) {
logger.error(error, info);
}
/**
* Delays this {@code BaseApp}'s startup until the {@code Storage}
* implementation of {@code localStorage} initializes. While the