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

import ViewPropTypes from deprecated-react-native-prop-types instead of react-native #345

Open
ThirupathaiahR opened this issue Jul 15, 2022 · 5 comments

Comments

@ThirupathaiahR
Copy link

In HTMLView.js
import ViewPropTypes from deprecated-react-native-prop-types instead of react-native

Please update

@jplandry908
Copy link

jplandry908 commented Aug 8, 2022

Add deprecated-react-native-prop-types change ViewPropTypes #346

@khelifioussama
Copy link

@jsdf

@leofolive
Copy link

leofolive commented Aug 23, 2022

@jplandry908 @khelifioussama

The patch solved my problem, I recommend that you use the patch and don't wait for updates on that lib.

react-native-htmlview+0.16.0.patch

diff --git a/node_modules/react-native-htmlview/HTMLView.js b/node_modules/react-native-htmlview/HTMLView.js
index 43f8b7e..8e4c9f7 100644
--- a/node_modules/react-native-htmlview/HTMLView.js
+++ b/node_modules/react-native-htmlview/HTMLView.js
@@ -1,8 +1,8 @@
 import React, {PureComponent} from 'react';
 import PropTypes from 'prop-types';
 import htmlToElement from './htmlToElement';
-import {Linking, Platform, StyleSheet, View, ViewPropTypes} from 'react-native';
-
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+import {Linking, Platform, StyleSheet, View} from 'react-native';
 const boldStyle = {fontWeight: 'bold'};
 const italicStyle = {fontStyle: 'italic'};
 const underlineStyle = {textDecorationLine: 'underline'};

Your project must depend on (deprecated-react-native-prop-types) for the patch to work, besides having a postinstall-postinstall lib and patch-package configured.

Another alternative is a fork of this lib and generate your own version with this fix.

@jplandry908
Copy link

Thanks @LFMAKER. I ended up swapping over to 'react-native-render-html' in my project which is more recently maintained. The change was fairly easy within my codebase. However, I appreciate you bringing the patch to my attention.

@kusaasira
Copy link

@LFMAKER did you delete the patch?

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

No branches or pull requests

5 participants