react-native-htmlview icon indicating copy to clipboard operation
react-native-htmlview copied to clipboard

ViewPropTypes will be removed from 'react-native'

Open Zeeshan404 opened this issue 1 year ago • 2 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Here is the diff that solved my problem:

node_modules/react-native-htmlview/HTMLView.js
 import React, {PureComponent} from 'react';
 import PropTypes from 'prop-types';
 import htmlToElement from './htmlToElement';
-import {Linking, Platform, StyleSheet, View, ViewPropTypes} from 'react-native';
+import {Linking, Platform, StyleSheet, View } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types'
 
 const boldStyle = {fontWeight: 'bold'};
 const italicStyle = {fontStyle: 'italic'};

Zeeshan404 avatar May 26 '23 09:05 Zeeshan404

@Zeeshan404 This Library is not updated for years. I forked this and resolved the issue myself and used it.

hfarhanahmed avatar May 26 '23 09:05 hfarhanahmed

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Here is the diff that solved my problem:

node_modules/react-native-htmlview/HTMLView.js
 import React, {PureComponent} from 'react';
 import PropTypes from 'prop-types';
 import htmlToElement from './htmlToElement';
-import {Linking, Platform, StyleSheet, View, ViewPropTypes} from 'react-native';
+import {Linking, Platform, StyleSheet, View } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types'
 
 const boldStyle = {fontWeight: 'bold'};
 const italicStyle = {fontStyle: 'italic'};

a quick solution could be to use the patch-package after modifying the part reported by @Zeeshan404.

nobady90 avatar Sep 13 '23 13:09 nobady90