From d3f8e7e44c5ce81d3b7461513d2ad98357078f02 Mon Sep 17 00:00:00 2001 From: Gustavo Benevenuto Date: Sat, 23 Apr 2022 18:41:13 -0300 Subject: [PATCH] Handling warning to rename componentWillMount to UNSAFE_componentWillMount, and componentWillReceiveProps to UNSAFE_componentWillReceiveProps --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 20107ac6..aed6df3e 100644 --- a/index.js +++ b/index.js @@ -99,11 +99,11 @@ class SvgUri extends Component{ } } - componentWillMount() { + UNSAFE_componentWillMount() { this.isComponentMounted = true; } - componentWillReceiveProps (nextProps){ + UNSAFE_componentWillReceiveProps (nextProps){ if (nextProps.source) { const source = resolveAssetSource(nextProps.source) || {}; const oldSource = resolveAssetSource(this.props.source) || {};