When I run expo start
the warning I receive is:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use.
...
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: SafeView, Transitioner
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
...
I know this is a warning and is not seen in production mode, but in order not to miss other possible warnings I want to get rid of this.
I am not using componentWillReceiveProps
but the dependencies expo
has are using.
- The suggested
npx react-codemod rename-unsafe-lifecycles
checks only the codes that I wrote, not the ones coming fromnode_modules
. - And the suggestion
Please update the following components: SafeView, Transitioner
is not applicable because they are not from the components that I included but fromexpo
and its dependencies where the major one is thereact-native
itself.
As a solution is there any method to get rid of this warning in a generic way? Else, is there a method to get rid for only SafeView
and Transitioner
components (i.e. react-native-safe-area-view react-navigation react-navigation-stack packages) ?
Seems being (as of March 2nd, 2020) addressed within SDK 38.
Pls refer to: