Simple HTML renderer for react-native
Ever had challenges rendering something in react-native? Can it render in HTML?
This simple package is worth a try.
npm install react-native-html --save
| Prop | Type | Note |
|---|---|---|
html |
String |
|
style |
WebView style |
This extends WebView styles |
<any |
WebView props |
Any other WebView prop(s) |
import Html from 'react-native-html';
const SomeComponent = () => (
<View style={{ flex: 1 }}>
<Html
style={{ width: 80, height: 80 }}
source={"<h1>hello world</h1>"
/>
</View>
);Lint & test (todo)
npm test