import { H2 } from '@expo/html-elements'; import * as React from 'react'; import { ActivityIndicator, StyleSheet, View, ScrollView } from 'react-native'; import { WebView } from 'react-native-webview'; interface MessageEvent { nativeEvent: { data: string; }; } const injectedJavaScript = `window.ReactNativeWebView.postMessage(JSON.stringify(window.location));`; export default function WebViewScreen() { return ( ); } WebViewScreen.navigationOptions = { title: 'WebView', }; function WebViewRemoteSource() { const [isLoading, setLoading] = React.useState(true); return (

Remote Source

setLoading(false)} onMessage={({ nativeEvent: { data } }: MessageEvent) => { console.log('Got a message from WebView: ', JSON.parse(data)); }} injectedJavaScript={injectedJavaScript} /> {isLoading && }
); } function WebViewInlineSource() { return (

Inline Source

You can always use a WebView if you need to!

But don't the other components above seem like better building blocks for most of your UI?

expo.dev

`, }} />
); } const styles = StyleSheet.create({ container: { flex: 1, minHeight: '50%', overflow: 'hidden', }, header: { marginLeft: 8, }, });