Making propTypes static
This commit is contained in:
@@ -5,17 +5,17 @@ import * as Sentry from '@sentry/browser';
|
||||
import SentryError from 'components/SentryError';
|
||||
|
||||
class SentryBoundary extends React.Component {
|
||||
state = {
|
||||
hasError: false
|
||||
}
|
||||
|
||||
propTypes = {
|
||||
static propTypes = {
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.arrayOf(PropTypes.node),
|
||||
PropTypes.node
|
||||
]).isRequired
|
||||
}
|
||||
|
||||
state = {
|
||||
hasError: false
|
||||
}
|
||||
|
||||
static getDerivedStateFromError() {
|
||||
return { hasError: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user