import { StatusBar } from "expo-status-bar"; import React from "react"; import { SafeAreaView, StyleSheet, Text } from "react-native"; import { WebView } from "react-native-webview"; function safeRun(fn: () => Promise) { return fn().catch((e) => { console.error(e); }); } export default function App() { const html = require("./bundle.json"); let ref = React.useRef(null); return ( { ref.current?.injectJavaScript('receiveMessage("Sup");'); }} > This is a header { console.log("Got event", event.nativeEvent.data); }} /> ); } const styles = StyleSheet.create({ container: { flex: 1, }, });