diff --git a/test/integration/basic/pages/nav/url-prop-change.js b/test/integration/basic/pages/nav/url-prop-change.js index 9d4cc67c..35abc8b6 100644 --- a/test/integration/basic/pages/nav/url-prop-change.js +++ b/test/integration/basic/pages/nav/url-prop-change.js @@ -11,13 +11,15 @@ export default class UrlPropChange extends React.Component { } // eslint-disable-next-line camelcase - UNSAFE_componentWillReceiveProps (nextProps) { - this.setState(() => { - return { - previousUrl: this.props.url, - url: nextProps.url - } - }) + componentDidUpdate (prevProps) { + if (prevProps.url !== this.props.url) { + this.setState(() => { + return { + previousUrl: prevProps.url, + url: this.props.url + } + }) + } } render () { diff --git a/test/integration/basic/pages/stateful.js b/test/integration/basic/pages/stateful.js deleted file mode 100644 index 76d2543b..00000000 --- a/test/integration/basic/pages/stateful.js +++ /dev/null @@ -1,23 +0,0 @@ - -import React, { Component } from 'react' - -export default class Statefull extends Component { - constructor (props) { - super(props) - - this.state = { answer: null } - } - - // eslint-disable-next-line camelcase - UNSAFE_componentWillMount () { - this.setState({ answer: 42 }) - } - - render () { - return ( -
The answer is {this.state.answer}
-