A bridge library to integrate React, Preact, or React Native Web apps into React Native apps via WebView with simplified communication.
react-native-react-bridge is a library that enables developers to embed web applications built with React, Preact, or React Native Web into React Native apps using WebView. It automates the bundling of web code and simplifies communication between React Native and WebView, reducing the complexity of integrating web-specific features or prototyping without full rewrites.
React Native developers who need to incorporate web-based components (like rich text editors or WebAssembly modules) or prototype hybrid apps without rewriting existing React web code.
Developers choose this library because it handles web app bundling automatically with esbuild during React Native's build process and provides React hooks for seamless message passing, eliminating manual configuration and communication hurdles.
An easy way to integrate your React (or Preact/React Native Web) app into React Native app with WebView.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses esbuild to bundle React apps for WebView during React Native's build process, eliminating manual webpack configuration. This is evident from the Key Features section.
Provides React hooks like `useWebViewMessage` and `useNativeMessage` for easy message passing between native and web, reducing boilerplate code. The README demonstrates this with emit functions.
Handles assets such as CSS, images, JSON, and WASM via ES6 imports, mimicking webpack loader behavior. This is specified in the Features list.
Supports React, Preact, and React Native Web with automatic import aliasing, allowing use of preferred web frameworks. The installation instructions detail this.
Only recompiles when the entry file changes, not for edits in other web files, due to Metro's build process limitation as noted in the README.
Requires modifying `metro.config.js` and potentially managing multiple transformers, which can be error-prone and add setup overhead. The Usage section shows this complexity.
Relies on react-native-webview, introducing performance bottlenecks and platform inconsistencies compared to native components, a trade-off mentioned in the philosophy.