Skip to content
Development docs

NITRO WEBVIEW / REACT NATIVE

Nitro +
WebView = πŸš€

A React Native WebView built on Nitro Modules. Connect your web content with typed callbacks and native APIs.

iOS Β· Android Β· New Architecture

TypeScriptNitro ModulesWKWebViewAndroid WebViewMIT licensed

WEB β†’ REACT NATIVE

From a page to your app.

Render a WebView and receive a message from the page. Wrap event handlers with callback().

Build your first WebView
Screen.tsxReact Native
tsx
import { NitroWebView, callback } from 'nitro-webview'

const html = `
<h1>Hello, Nitro</h1>
<script>
  window.ReactNativeWebView.postMessage('hello from the web')
</script>
`

export default function Screen() {
  return (
    <NitroWebView
      style={{ flex: 1 }}
      source={{ html, baseUrl: 'https://app.example.com' }}
      onMessage={callback(({ nativeEvent }) => {
        console.log(nativeEvent.data)
      })}
    />
  )
}
onMessagehello from the web

DOCUMENTATION

Start with what you want to build.

Different platforms. Explicit behavior.

Check platform support

MIT licensed Β· Built with Nitro Modules