question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ViewPropTypes will be removed from React Native.

See original GitHub issue

This is a warning that appears in React Native 0.68, it seems rnmapbox imports this export which will be removed.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wootsbotcommented, Jul 4, 2022

@ludvigeriksson Could help to follow the steps you feel

  • install patch-package mode dev
  • 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 or yarn patch-package @react-native-mapbox-gl/maps
1reaction
simon-abbottcommented, Jun 29, 2022

RN 0.69 actually removed it, so this is now a fatal error instead of just a warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ViewPropTypes will be removed from React Native. Migrate to ...
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
Read more >
ViewPropTypes will be removed from React ... - Stack Overflow
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types · Solution:.
Read more >
expo viewproptypes has been removed from react native
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. Reproducible sample code.
Read more >
deprecated-react-native-prop-types - Yarn - Package Manager
1 / 2022-12-02. Compatible with React Native 0.71; Improvements to ImagePropTypes. Merged Android and default definitions. Included all of ViewPropTypes .
Read more >
viewproptypes will be removed from react ... - Code Grepper
viewproptypes will be removed from react native. migrate to viewproptypes exported from 'deprecated-react-native-prop-types'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found