-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecated UIManager usage when accessing component names #2740
Conversation
lib/components/MapView.js
Outdated
@@ -915,7 +937,7 @@ if (Platform.OS === 'android') { | |||
} | |||
const getAirMapComponent = provider => airMaps[provider || 'default']; | |||
|
|||
const AIRMapLite = NativeModules.UIManager.AIRMapLite && | |||
const AIRMapLite = NativeModules.UIManager.getViewManagerConfig('AIRMapLite') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably will crash on RN <0.58 because UIManager does not have property getViewManagerConfig. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vovkasm Good point, I just pushed a commit to add the same check for UIManager.getViewManagerConfig
here too.
@vovkasm please let us know if the latest change it's ok and we merge 🎉 |
@rborn technically it looks correct. But I would recommend refactor the code to have logic in one place and not to spread hacks through source files. |
@vovkasm @declanelcocks can you two please coordinate, maybe we get something better out of this 🤗 |
Ahm... Unfortunately I'm currently almost has no time to work on code. |
@vovkasm I can help to refactor it into a helper function, but probably won't get around to it until this weekend or early next week. I'd suggest the same as you and to merge this PR in for now, then make a new PR to refactor the |
can you please merge as is and refactor later? this one is really important and fixes the map for RN 0.59.x |
@declanelcocks @vovkasm I'll merge this one, please ping me when you refactor the code 🤗 |
@christopherdro maybe we should make a release so we have RN 0.59 working form npm? |
I can confirm master branch now works for me on android |
When can we expect a new release with the fix for RN 0.59? |
We need to put together the release notes. |
@forki @kumaresan-cgvak any of you fancy a changelog PR fort he release ? this is the last published commit 51ff723 and this is an example of a previous changelog: https://github.com/react-native-community/react-native-maps/pull/2666/files#diff-4ac32a78649ca5bdd8e0ba38b7006a1e Thanks! |
How can I install master ? Thanks! |
@LuiisFernando |
Does any other open PR do the same thing?
https://github.com/react-native-community/react-native-maps/pull/2671/files
What issue is this PR fixing?
As mentioned in #2620, there are some YellowBox warnings with deprecated
UIManager
calls being used. The PR above fixed some of the warnings, but a warning still pops up regardingAIRMapLite
andAIRMap
.How did you test this PR?
react-native-maps
to[email protected]
MapView
componentUIManager
usage exists