Skip to content
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 add deprecated-react-native-prop-types library for react-native-hms-map #243

Closed
wants to merge 1 commit into from

Conversation

Splicer97
Copy link

In version react-native above 0.68 Facebook deleted ViewPropTypes from react-native. I add deprecated-react-native-prop-types package dependency and tested it in "react-native": "0.69.3" and that's work

@bakiinitialcode
Copy link

Thanks for the fix. Any information on when it will be merged and published? We are getting this error and waiting for it to be fixed to release a version.

@Splicer97
Copy link
Author

Splicer97 commented Nov 3, 2022

Thanks for the fix. Any information on when it will be merged and published? We are getting this error and waiting for it to be fixed to release a version.

You can use my fork for huawei maps if you want
yarn add Splicer97/react-native-hms-map

@Splicer97
Copy link
Author

@ozcanozgur can you check it PR please?

@next6leo
Copy link

next6leo commented Jan 13, 2023

@ozkulbeng @ozcanozgur bump has this merge into master?

@MateuszRostkowski
Copy link

MateuszRostkowski commented Jan 27, 2023

@next6leo
As a workaround for now you can add patch (use patch-package for this).

Create file: patches/@hmscore+react-native-hms-map+6.3.1-305.patch:

diff --git a/node_modules/@hmscore/react-native-hms-map/src/CircleView.js b/node_modules/@hmscore/react-native-hms-map/src/CircleView.js
index 0555718..858b66c 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/CircleView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/CircleView.js
@@ -16,7 +16,8 @@
 
 import { exact, oneOf, number, arrayOf, bool, func, oneOfType } from "prop-types";
 import React, { Component } from "react";
-import { requireNativeComponent, ViewPropTypes } from "react-native";
+import { requireNativeComponent } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import { PatternItemTypes } from "./constants";
 
 class HMSCircleView extends Component {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/GroundOverlayView.js b/node_modules/@hmscore/react-native-hms-map/src/GroundOverlayView.js
index 9d4d08f..7d54d1b 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/GroundOverlayView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/GroundOverlayView.js
@@ -25,7 +25,8 @@ import {
   arrayOf,
 } from "prop-types";
 import React, { Component } from "react";
-import { requireNativeComponent, ViewPropTypes } from "react-native";
+import { requireNativeComponent } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 
 class HMSGroundOverlayView extends Component {
   constructor() {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/InfoWindowView.js b/node_modules/@hmscore/react-native-hms-map/src/InfoWindowView.js
index f8b4d59..a540705 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/InfoWindowView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/InfoWindowView.js
@@ -15,7 +15,8 @@
 */
 
 import React, { Component } from "react";
-import { requireNativeComponent, ViewPropTypes, View } from "react-native";
+import { requireNativeComponent, View } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 
 class HMSInfoWindowView extends Component {
   constructor() {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/MapView.js b/node_modules/@hmscore/react-native-hms-map/src/MapView.js
index aa705fa..ec6b16f 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/MapView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/MapView.js
@@ -21,8 +21,8 @@ import {
   requireNativeComponent,
   UIManager,
   NativeModules,
-  ViewPropTypes,
 } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 
 const { HMSMapViewModule } = NativeModules;
 
diff --git a/node_modules/@hmscore/react-native-hms-map/src/MarkerView.js b/node_modules/@hmscore/react-native-hms-map/src/MarkerView.js
index 5f65f76..bbd0925 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/MarkerView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/MarkerView.js
@@ -20,8 +20,8 @@ import {
   findNodeHandle,
   requireNativeComponent,
   UIManager,
-  ViewPropTypes,
 } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 
 class HMSMarkerView extends Component {
   constructor() {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/PolygonView.js b/node_modules/@hmscore/react-native-hms-map/src/PolygonView.js
index 821116e..63e0368 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/PolygonView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/PolygonView.js
@@ -16,7 +16,8 @@
 
 import { exact, oneOf, number, arrayOf, bool, func, oneOfType } from "prop-types";
 import React, { Component } from "react";
-import { requireNativeComponent, ViewPropTypes } from "react-native";
+import { requireNativeComponent } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import { PatternItemTypes } from "./constants";
 
 class HMSPolygonView extends Component {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/PolylineView.js b/node_modules/@hmscore/react-native-hms-map/src/PolylineView.js
index 345909b..72da911 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/PolylineView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/PolylineView.js
@@ -16,7 +16,8 @@
 
 import { string, exact, oneOf, number, arrayOf, bool, func, oneOfType } from "prop-types";
 import React, { Component } from "react";
-import { requireNativeComponent, ViewPropTypes } from "react-native";
+import { requireNativeComponent } from "react-native";
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import { PatternItemTypes, CapTypes, JointTypes } from "./constants";
 
 class HMSPolylineView extends Component {
diff --git a/node_modules/@hmscore/react-native-hms-map/src/TileOverlayView.js b/node_modules/@hmscore/react-native-hms-map/src/TileOverlayView.js
index a9fda6d..6842def 100644
--- a/node_modules/@hmscore/react-native-hms-map/src/TileOverlayView.js
+++ b/node_modules/@hmscore/react-native-hms-map/src/TileOverlayView.js
@@ -16,7 +16,8 @@
 
 import { number, bool, exact, string, oneOfType, arrayOf } from 'prop-types';
 import React, { Component } from 'react';
-import { findNodeHandle, requireNativeComponent, UIManager, ViewPropTypes } from 'react-native';
+import { findNodeHandle, requireNativeComponent, UIManager } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 
 class HMSTileOverlayView extends Component {
   constructor() {

@Splicer97 Splicer97 closed this by deleting the head repository Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants