Skip to content

Commit fed05e0

Browse files
authored
Rename componentDidError to componentDidCatch
1 parent 0ec2bfa commit fed05e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ErrorBoundary.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ class ErrorBoundary extends Component {
3737

3838
unstable_handleError(error: Error, info: ErrorInfo):void {
3939
// This method is a fallback for react <= 16.0.0-alpha.13
40-
this.componentDidError(error, info);
40+
this.componentDidCatch(error, info);
4141
}
4242

43-
componentDidError(error: Error, info: ErrorInfo):void {
43+
componentDidCatch(error: Error, info: ErrorInfo):void {
4444
const {onError} = this.props;
4545

4646
if (typeof onError === 'function') {
@@ -66,4 +66,4 @@ class ErrorBoundary extends Component {
6666
}
6767
}
6868

69-
export default ErrorBoundary;
69+
export default ErrorBoundary;

0 commit comments

Comments
 (0)