react-native-url-preview
react-native-url-preview copied to clipboard
Support web
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
hey, I got the same issue. Looking for a solution.
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
Hi, here's what I did to make module compatible with react-native-web :
https://github.com/maherzaidoune/react-native-url-preview/pull/48