Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1199 | Rev 1202 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1199 Rev 1200
Línea 9... Línea 9...
9
  constructor(props) {
9
  constructor(props) {
10
    super(props)
10
    super(props)
11
    this.state = { hasError: false }
11
    this.state = { hasError: false }
12
  }
12
  }
Línea -... Línea 13...
-
 
13
 
-
 
14
  static getDerivedStateFromError() {
-
 
15
    return { hasError: true }
-
 
16
  }
13
 
17
 
14
  componentDidCatch(error, errorInfo) {
-
 
15
    this.setState({ hasError: true })
18
  componentDidCatch(error, errorInfo) {
16
    console.error('ErrorBoundary caught an error: ', error, errorInfo)
19
    console.error('ErrorBoundary caught an error: ', error, errorInfo)
17
    this.props.addNotification({ style: 'danger', msg: error.message })
20
    this.props.addNotification({ style: 'danger', msg: error.message })
Línea 18... Línea 21...
18
  }
21
  }