@fobos531/react-native-render-html
v6.4.1
Published
The hackable, full-featured Open Source HTML rendering solution for React Native.
Downloads
489
Maintainers
Readme
:computer: Install
npm install @fobos531/react-native-render-html
yarn add @fobos531/react-native-render-html
:speedboat: Basic Usage
import React from 'react';
import { useWindowDimensions } from 'react-native';
import RenderHtml from '@fobos531/react-native-render-html';
const source = {
html: `
<p style='text-align:center;'>
Hello World!
</p>`
};
export default function App() {
const { width } = useWindowDimensions();
return (
<RenderHtml
contentWidth={width}
source={source}
/>
);
}