use-dom

Run React web code in Expo apps via DOM components in a native webview.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use DOM components to run existing React web code verbatim inside an Expo app, avoiding the need to rewrite for React Native while keeping the UI usable and interactive.

Core Features & Use Cases

  • Web-only library support: Render charting, syntax highlighting, and other DOM-dependent React web libraries inside a native-friendly container.
  • Incremental migration: Bring existing web components into the mobile app progressively instead of doing a full rewrite.
  • Complex web layouts: Use HTML/CSS capabilities (including embeds and iframes) when native equivalents are impractical.
  • Platform behavior: Works on iOS and Android via WebView, and renders as-is on web where no wrapper is needed.

Quick Start

Use a component file that starts with the directive "use dom" and passes a dom prop typed as import("expo/dom").DOMProps to control the webview behavior.

Frequently Asked Questions about use-dom

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

FAQPage Schema
How do I run existing React web code inside an Expo app without rewriting it for React Native?

Run React web code inside Expo using DOM components rendered in a native WebView. This allows you to use web-only libraries and complex HTML/CSS layouts directly within your mobile app without rewriting the UI for React Native.

Can I use web-only React libraries like charting or syntax highlighting in React Native?

Yes, you can render DOM-dependent web libraries like charting tools inside a native-friendly Expo container. The component renders via WebView on iOS and Android, allowing you to use web libraries without needing native equivalents.

What is the best way to incrementally migrate a web UI to a React Native app?

Incrementally migrate web UI by bringing existing web components into Expo progressively using DOM components. This approach avoids a full rewrite, letting you transition your existing HTML and CSS codebase into the mobile app piece by piece.

Does Expo support rendering complex HTML, CSS, embeds, and iframes on mobile?

Expo supports rendering complex HTML, CSS, embeds, and iframes through DOM components. On iOS and Android, these components render inside a native WebView, enabling full web capabilities when practical native equivalents are unavailable.

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

Creating a DOM component requires a root-level SKILL.md entrypoint, a dom prop typed as import("expo/dom").DOMProps, the "use dom" directive, a single default export, serializable props, and isolated CSS within the component.