SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

ViewPropTypes will be removed from React Native #136

Closed abdoutech19 closed 2 years ago

abdoutech19 commented 2 years ago

I get this warning when loading the module: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Please fix the issue since the only way around it now is to silence the warning using:

 LogBox.ignoreLogs([
"exported from 'deprecated-react-native-prop-types'.",
])
andrew-schenk commented 2 years ago

patch-package to fix this in v5.0.1 for RN 68+.

patches/react-native-popover-view+5.0.1.patch

diff --git a/node_modules/react-native-popover-view/dist/Popover.js b/node_modules/react-native-popover-view/dist/Popover.js
index 1d5b497..5a01fde 100644
--- a/node_modules/react-native-popover-view/dist/Popover.js
+++ b/node_modules/react-native-popover-view/dist/Popover.js
@@ -45,7 +45,7 @@ import RNModalPopover from './RNModalPopover';
 var stylePropType = isWeb
     ? PropTypes.object
     // eslint-disable-next-line
-    : require('react-native').ViewPropTypes.style;
+    : require('deprecated-react-native-prop-types').ViewPropTypes.style;
 var Popover = /** @class */ (function (_super) {
     __extends(Popover, _super);
     function Popover() {
SteffeyDev commented 2 years ago

Fixed in 5.0.2