use-dom

Run web code inside native Expo apps using DOM components.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/IlyaKukarkin/bee_bloom --skill use-dom-ilyakukarkin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/IlyaKukarkin/bee_bloom/tree/main/.agents/skills/use-dom
Command: npx skills add https://github.com/IlyaKukarkin/bee_bloom --skill use-dom-ilyakukarkin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Web libraries and complex HTML/CSS rely on DOM APIs that aren't readily available in native React Native. DOM components enable web code to run in a WebView on native while rendering as-is on web, supporting incremental migration of web code to native.

Core Features & Use Cases

  • Run web code inside native apps via WebView while preserving web behavior on the web.
  • Reuse web libraries and web-based UI in Expo apps, enabling a progressive migration path from web to native.
  • Use cases include embedding charts, syntax highlighters, or rich HTML content that rely on DOM APIs, with native interactions where appropriate.

Quick Start

Create a component file with the 'use dom'; directive at the top and export a single default component that renders in a WebView on native and directly on web.

Frequently Asked Questions about use-dom

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run web code inside a React Native Expo app?▼

To run web code inside a React Native Expo app, use DOM components with the 'use dom'; directive at the top of your file. This renders your web code in a WebView on native while preserving standard web behavior on the web platform.

Can I reuse web libraries that rely on DOM APIs in Expo?▼

Yes, you can reuse web libraries in Expo by using DOM components. This allows libraries relying on DOM APIs, such as charts or syntax highlighters, to run inside a native WebView while supporting a progressive migration path to native.

What is the 'use dom' directive in Expo?▼

The 'use dom' directive is a special instruction placed at the top of a component file to enable DOM component behavior. It requires a single default export component and proper dom props to control the WebView across platforms.

Does DOM component rendering work on both web and native platforms?▼

DOM component rendering works on both web and native platforms. On native, the web code runs inside a WebView, while on the web, the component renders as-is, ensuring consistent behavior across both environments without code duplication.

What's the best way to progressively migrate web UI to native Expo?▼

The best way to progressively migrate web UI to native Expo is using DOM components. They allow you to embed traditional web content in a native shell, enabling incremental migration by running web code in a WebView while developing native interactions where appropriate.

What are the requirements for creating a DOM component in Expo?▼

Creating a DOM component requires the 'use dom'; directive at the very top of the file, a single default export component, and proper dom props to control the WebView behavior. This structure ensures the web code renders correctly across native and web platforms.