HTML markup is translated into React Native views. See the Architecture page for more details.
Its design balances compliance to HTML and CSS standards with lightweightness, despite some limitations and caveats.
It aims at being extremely customizable. For example, you can define custom renderers targetting specific tags with a mean to define children rendering, provide styles for tags, classes and ids, and tamper with the DOM.
If your use-case is pretty straightforward, you might implement your own, lightweight HTML renderer.
react-native-webviewinstead. Beware that it will certainly have a bigger impact on your App's performances, since it will use the system's Web View.
The best use case for library is when the content to render is predictable (e.g. you know in advance the tags and classes to support), such as rendering content from a CMS, or via API endpoints.
You might also benefit from this library if you need to render sections of a web page such as articles which content is reasonably predictable, (see Root Selection to select an element of the DOM to render).
You should probably not use this library if you need to render arbitrary, unpredictable content.
react-native-render-html Foundry release (v6) on your project:
Let's start with a simple example:
Press the Run on Your Device with Expo button to try it out on your device, and change the HTML from the Expo editor.
Inspect the pre-render tree representation with the TRT Snapshot tab.