From 939e3814b32c3ff9d84cda3681c61ea60803fe64 Mon Sep 17 00:00:00 2001 From: Ofer Sarid Date: Wed, 6 May 2020 14:19:52 +0300 Subject: [PATCH] Update Row.js console warning cleanup Update Row.js so console will stop show waning on deprecated componentWillReceiveProps --- src/Row.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Row.js b/src/Row.js index 32718a8..543f659 100644 --- a/src/Row.js +++ b/src/Row.js @@ -142,10 +142,10 @@ export default class Row extends Component { }, }); - componentWillReceiveProps(nextProps) { - if (!this._active && !shallowEqual(this._location, nextProps.location)) { - const animated = !this._active && nextProps.animated; - this._relocate(nextProps.location, animated); + componentDidUpdate(prevProps) { + if (!this._active && !shallowEqual(this._location, this.props.location)) { + const animated = !this._active && this.props.animated; + this._relocate(this.props.location, animated); } }