React Native Webview Bridge

screenshot of React Native Webview Bridge
react-native

React Native Webview Bridge

React Native Webview with Javascript Bridge

Overview

The React Native WebView Javascript Bridge allows for a seamless communication bridge between React Native and WebView, enabling developers to easily pass data back and forth between the native and webview components. With key features such as special bridge scripts, methods to send and receive messages, and props for file access settings, this extension streamlines the integration process between React Native and webview components.

Features

  • Bridge Script: Special script injected into all webviews, automatically registering a global variable called WebViewBridge.
  • sendToBridge Method: Facilitates sending messages from React Native to webview, with the message required to be in string format.
  • onBridgeMessage Prop: A function prop that is called upon receiving a message from the webview.
  • allowFileAccessFromFileURLs (Android): Prop enabling locally loaded pages via file:// to access other file:// resources.
  • allowUniversalAccessFromFileURLs (Android): Prop enabling locally loaded pages via file:// to access resources in any origin.
react-native
React Native

React Native is a framework for building mobile applications using React and JavaScript. It enables developers to write once and deploy to multiple platforms, including iOS, Android, and the web, while providing a native app-like experience to users.