Skip to content

About

Nitro + WebView = 🚀

Topics

Resources

Stars

33 stars

Watchers

0 watching

Forks

Latest commit

 

History

139 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nitro WebView

Nitro WebView

A React Native WebView powered by Nitro Modules.

npm version npm downloads per week License: MIT

Documentation · 한국어 문서 · API reference · Quick start

iOS · Playground Android · Playground iOS · JavaScript bridge Android · JavaScript bridge
iOS playground with the capability catalog Android playground with the capability catalog iOS WebView showing a native message and JavaScript evaluation result Android WebView showing a native message and JavaScript evaluation result

Captured from the iOS and Android Release playground apps.

Embed web content in iOS and Android React Native apps with Nitro Modules. Native views are written in Swift and Kotlin, with props and events dispatched through JSI.

Features

  • Load web pages or render HTML with typed props, methods, and events.
  • Exchange messages between your app and the page.
  • Inject JavaScript on page loads or evaluate scripts and read their results.
  • Control navigation and manage cookies from React Native.

See platform support for differences between iOS and Android.

Quick start

Version 0.2.2 requires React Native's New Architecture, React Native ~0.85.3, React 19.2.3, and Nitro Modules ^0.35.9. See the installation requirements for platform constraints.

yarn add nitro-webview@0.2.2 react-native-nitro-modules
cd ios && pod install

react-native-nitro-modules is a required peer dependency. Rebuild your native app after installation.

import { NitroWebView } from 'nitro-webview'

export default function Screen() {
  return (
    <NitroWebView
      style={{ flex: 1 }}
      source={{ uri: 'https://example.com' }}
      onLoadEnd={() => console.log('loaded')}
    />
  )
}

Version 0.2.2 accepts plain functions for event props and hybridRef and wraps them internally. Existing callback(...) calls remain supported.

Documentation

Development

See the example app and native regression checks and documentation site workflow.

Contributing

For changes that need a release, include a changeset with your pull request.

License

MIT.

About

Nitro + WebView = 🚀

Topics

Resources

Stars

33 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages