Use key instead

This commit is contained in:
Jori Lallo
2017-12-03 20:56:45 -08:00
parent 42d5686182
commit 564748cfc0
2 changed files with 1 additions and 12 deletions

View File

@ -2,12 +2,10 @@
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { observable } from 'mobx';
import type { Location } from 'react-router-dom';
import CenteredContent from 'components/CenteredContent';
import PageTitle from 'components/PageTitle';
type Props = {
location?: Location,
children?: ?React.Element<any>,
};
@ -16,15 +14,6 @@ class ErrorBoundary extends Component {
props: Props;
@observable error: boolean = false;
componentWillReceiveProps(nextProps: Object) {
if (
this.props.location &&
nextProps.location &&
this.props.location.pathname !== nextProps.location.pathname
)
this.error = false;
}
componentDidCatch(error: Error, info: Object) {
this.error = true;