maps
maps copied to clipboard
ViewPropTypes will be removed from React Native.
This is a warning that appears in React Native 0.68, it seems rnmapbox
imports this export which will be removed.
It looks like the JS code has to be converted to TypeScript, but for now it should be sufficient to import ViewPropTypes from deprecated-react-native-prop-types
RN 0.69 actually removed it, so this is now a fatal error instead of just a warning.
@ludvigeriksson Could help to follow the steps you feel
- install
patch-package
modedev
- add script
"postinstall": "patch-package",
- install
deprecated-react-native-prop-types
- make these changes to the file
node_modules/@react-native-mapbox-gl/maps/javascript/utils/index.js
import React from 'react';
import {
- ViewPropTypes,
- View,
NativeModules,
findNodeHandle,
Platform,
} from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
-export const viewPropTypes = ViewPropTypes || View.props;
+export const viewPropTypes = ViewPropTypes;
-
npm run patch-package @react-native-mapbox-gl/maps
oryarn patch-package @react-native-mapbox-gl/maps
patch-package
also requires postinstall-postinstall
with yarn
: https://www.npmjs.com/package/patch-package#why-use-postinstall-postinstall-with-yarn
Should be fixed in @rnmapbox/maps