bh03lj
bh03lj

Reputation: 101

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

Upvotes: 10

Views: 9102

Answers (6)

Frébo
Frébo

Reputation: 678

If you are using expo, you can now use the command

expo install react-native-gesture-handler

This will make sure nothing breaks by installing react-native-gesture-handler in version 1.3.0 instead of 1.5.x.
There is a pretty recent issue on Github discussing this.

Upvotes: 0

Hamid Shoja
Hamid Shoja

Reputation: 4786

you need just downgrade react-native-gesture-handler to 1.3.0.

also You can do these steps:

  1. directly change version in your package.json to ~1.3.0
  2. run npm i or remove it and install through expo
  3. sometimes it needs to clear cache of expo > expo r -c

Upvotes: 0

Sunny Sultan
Sunny Sultan

Reputation: 1180

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

Upvotes: 1

Greg T
Greg T

Reputation: 3414

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

Upvotes: 19

Bill Zelenko
Bill Zelenko

Reputation: 2858

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

yarn add [email protected]

Upvotes: 3

tomjnsn
tomjnsn

Reputation: 135

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

Upvotes: 1

Related Questions