This happens even if I hardcode the prop to be an array, for example:
<MapboxGL.MapView
centerCoordinate={[-122.452652, 37.762963]} />
Is it possible that the new code is somehow mutating the type? I noticed that in https://github.com/mapbox/react-native-mapbox-gl/blob/c428b2297170b30a6d4e4d855320d28b48d17262/javascript/components/MapView.js#L590-L613 the array is converted to a JSON string toJSONString((makePoint(this.props.centerCoordinate)))
No one else has reported this problem with the new version of the library, so it makes me wonder if I'm doing something wrong here...
Same error when I pass in a coordinate Array to the PointAnnotation component:
<MapboxGL.PointAnnotation
key={annotation.id}
id={annotation.id}
title={annotation.title}
coordinate={[0, 0]} />
What version of react, prop-types, and react-native are you using?
Hi @nitaliano - looking at my yarn.lock file they are
react 16.0.0-alpha.12
prop-types 15.6.0
react-native 0.48.4
Just an FYI, I upgraded to RN 0.50.3 using react-native-git-upgrade and the error disappeared.
My issue is resolved, but I'll leave this open if you want to track the issue w/r/t backwards compatibility, @nitaliano
We can make a note in the README about this and close this out once that is merged in.
I had this warning too with RN 0.48.4. But after updating to 0.49.0 it warning disappears. I think this can be closed
Is there any alternative to this besides upgrading react-native?
Most helpful comment
Is there any alternative to this besides upgrading react-native?