0

How can I get the same result in React Native's <Text></Text> for the place of the code written below in React-web-app:

<p dangerouslySetInnerHtml={{ __html: myString }} />
Anthon Santhez
  • 402
  • 1
  • 7
  • 13
  • Does this answer your question? [Render HTML in React Native](https://stackoverflow.com/questions/29334984/render-html-in-react-native) – Nick Bailey Aug 05 '22 at 21:54
  • I think you may not understand how RN works. It effectively executes with native components. Since native iOS/Android do not use HTML, the idea of rendering HTML makes no sense. Stuff that depends on the browser is not portable to RN. – Nick Bailey Aug 05 '22 at 21:55
  • @NickBailey Yes I am new at playing with html's inside react native. Therefore I am asking a workaround solution for that, or how to effectively render an Html written API response – Anthon Santhez Aug 05 '22 at 22:01
  • @NickBailey I've observed that post before, but I thought maybe some new features were added since 2021. Probably I should embed webview then? – Anthon Santhez Aug 05 '22 at 22:07
  • Yep. Webview is the only option. – Nick Bailey Aug 05 '22 at 22:52
  • @NickBailey not quite. There are usecases. I am trying to use my native app on the browser. I would love to just render stuff directly without having to use `WebView` related stuff which is trully bugy in react native web. – Jiří Aug 31 '23 at 11:47

0 Answers0