use-dom

Run web code in native apps via Expo DOM components.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/cristianbc2004/Project_BettherAuth --skill use-dom-cristianbc2004
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/cristianbc2004/Project_BettherAuth/tree/main/.agents/skills/use-dom
Command: npx skills add https://github.com/cristianbc2004/Project_BettherAuth --skill use-dom-cristianbc2004

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Web code can run in native apps through Expo DOM components, while rendering unchanged on the web, enabling incremental migration of web code to native.

Core Features & Use Cases

  • Webview-based runtime to render DOM components inside native apps
  • Reuse web libraries (charts, syntax highlighters, HTML/CSS content) without rewriting
  • Migrate web code gradually by isolating web-specific logic in DOM components
  • Real-world scenario: embed a complex web UI in a native shell and progressively replace with native equivalents

Quick Start

Add the 'use dom' directive at the top of your file to enable a DOM component and export a single default React component.

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 in native apps without rewriting it?

To run web code in native apps, add the 'use dom' directive at the top of a file and export a single default React component. This webview-based runtime renders DOM components in native apps while preserving standard web rendering.

What is the best way to migrate web code gradually to React Native?

Migrate web code gradually by isolating web-specific logic in DOM components. You can embed a complex web UI in a native shell and progressively replace it with native equivalents without a full rewrite.

Can I reuse web libraries like syntax highlighters in Expo projects?

Yes, you can reuse web libraries like syntax highlighters and charts in Expo projects. DOM components use a webview-based runtime to render these HTML and CSS-heavy libraries without rewriting them for native.

Does Expo DOM rendering work unchanged on the web?

Expo DOM rendering preserves web rendering unchanged on the web. The 'use dom' directive activates a webview-based runtime specifically for native apps, leaving web output unaffected.

What are the requirements for DOM components in Expo?

DOM components require the 'use dom' directive, a single default export, their own file, serializable props, and inline CSS. Meeting these requirements enables the webview-based runtime to render HTML-heavy content.

When should I not use DOM components for React Native migration?

Avoid DOM components when you need to fully rewrite web logic natively instead of isolating it, or if you cannot meet the strict requirements like inline CSS and serializable props.