Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Accessing view manager configs directly off UIManager via UIManager['AIRMap'] is no longer supported

I'm getting the following warning "Accessing view manager configs directly off UIManager via UIManager['AIRMap'] is no longer supported. Use UIManager.getViewManagerConfig('AIRMap') instead". Its been showing since I have installed the react-native-maps package. Should I ignore it or its there a solution for it?

Thanks in advance

like image 987
bh03lj Avatar asked Feb 24 '19 22:02

bh03lj


4 Answers

This is fixed by downgrading "react-native-gesture-handler" to 1.3.0. You also need to clear the cache or you'll continue to see the warning.

  1. Modify your package.json:

"react-native-gesture-handler": "~1.3.0"

  1. Reinstall dependencies:

npm install or yarn install

  1. Restart expo with a clear cache:

expo r -c

like image 64
Greg T Avatar answered Oct 25 '22 23:10

Greg T


To hide the warning, downgrade react-native-gesture-handler to ‘1.3.0’.

yarn add [email protected]

like image 36
Bill Zelenko Avatar answered Oct 26 '22 00:10

Bill Zelenko


This appears to be a known issue with react-native 0.58 https://github.com/react-native-community/react-native-maps/issues/2620

like image 31
tomjnsn Avatar answered Oct 26 '22 01:10

tomjnsn


This is for those who want a quick fix, here are some commands that you can run to fix it. Remember this solution is for expo users.

// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear
like image 29
Sunny Sultan Avatar answered Oct 25 '22 23:10

Sunny Sultan