What problem does it solve?
Enables running web-only React components and libraries inside Expo native apps by hosting them in an embedded DOM-backed webview on native platforms while rendering them as-is on web, removing the need to rewrite web UI for native environments.
Core Features & Use Cases
- Use web-only libraries: Support for libraries that depend on DOM APIs such as charting and syntax highlighting without modification.
- Incremental migration: Embed existing React web components in native screens to migrate codebases gradually.
- Native interaction: Expose native functionality to the webview via async props and configure behavior through a dom prop for scrolling, sizing, and safe area handling.
- Styling and assets: Allow CSS imports or inline styling within the DOM component file and require assets to be bundled alongside the component.
- Platform behavior: Renders inside a WebView on iOS/Android and as native DOM on web, with the dom prop ignored on web.
Quick Start
Create a component file that begins with the use dom directive, export a single default React component with only serializable props, then import and render it from a native screen while passing a dom prop to configure the webview.