What problem does it solve?
DOM components let web code run verbatim in a WebView on native platforms while rendering as-is on web, enabling incremental migration of web apps to native without rewriting logic.
Core Features & Use Cases
- Reuse web libraries and UI components inside native apps by rendering in a WebView while keeping native performance on the rest of the UI.
- Incrementally migrate existing web code to native by porting components one by one and gradually replacing web-only dependencies.
- Configure per-component behavior with the
dom prop, enabling control over scrolling, layout, and styling from the native host while preserving web parity.
- Isolate DOM components in their own context to avoid global state sharing and to simplify CSS scoping and asset management.
- Use web tooling and libraries (syntax highlighting, charts, HTML layouts) inside native apps without rewriting their logic.
Quick Start
Create a new React component with the 'use dom'; directive at the top and export a default component that uses the dom prop to render web content inside a WebView on native while rendering unmodified on web.