react-native-url-preview icon indicating copy to clipboard operation
react-native-url-preview copied to clipboard

Support web

Open johannbuscail opened this issue 3 years ago • 3 comments

Hey! I really love this library, and it works perfectly on native platforms. The only thing is I'm using my app on the web with react-native-web. I get this error:

TypeError: Cannot read property 'style' of undefined Module.../../../../../../../../../Users/kristinabuscail/nodejs/wavychat-expo/node_modules/react-native-url-preview/index.js node_modules/react-native-url-preview/index.js:252 249 | onLoad: PropTypes.func, 250 | onError: PropTypes.func, 251 | text: PropTypes.string,

252 | containerStyle: ViewPropTypes.style, 253 | imageStyle: ViewPropTypes.style, 254 | faviconStyle: ViewPropTypes.style, 255 | textContainerStyle: ViewPropTypes.style, View compiled

Would be really cool to have your help. BTW could you add typescript types. Would be much easier

johannbuscail avatar Feb 12 '21 07:02 johannbuscail

hey, I got the same issue. Looking for a solution.

yalisun avatar Mar 09 '21 21:03 yalisun

Hello, Thanks for your feedback, I'll try to look into that in the next few days, if anyone could help in that, PRs are very welcome

maherzaidoune avatar Mar 27 '21 21:03 maherzaidoune

Hi, here's what I did to make module compatible with react-native-web :

https://github.com/maherzaidoune/react-native-url-preview/pull/48

dfabreguette avatar Feb 09 '22 16:02 dfabreguette