Skip to content

Commit aea0ff0

Browse files
Add fallback default prop
1 parent 30e5ef7 commit aea0ff0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ class BasicErrorBoundary extends Component {
1313
onError: PropTypes.func
1414
}
1515

16+
static defaultProps = {
17+
fallback: () => null
18+
}
19+
1620
static getDerivedStateFromError(error) {
1721
return { hasError: true, error };
1822
}

0 commit comments

Comments
 (0)