From 6b7ed125b4f8482a2862b0a68e2f675190b1781a Mon Sep 17 00:00:00 2001 From: Thibault Goudouneix Date: Wed, 3 Aug 2022 15:17:37 +0200 Subject: [PATCH] Replace deprecated lifecycle hooks to UNSAFE ones --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 58366be..80a72f3 100644 --- a/src/index.js +++ b/src/index.js @@ -167,14 +167,14 @@ export default class Swipeable extends PureComponent { rightButtonsOpen: false }; - componentDidMount() { + UNSAFE_componentDidMount() { const {onPanAnimatedValueRef, onRef} = this.props; onRef(this); onPanAnimatedValueRef(this.state.pan); } - componentWillUnmount() { + UNSAFE_componentWillUnmount() { this._unmounted = true; }