use-dom

Run web-centric React components in a WebView across iOS, Android, and Web.

1|Updated Oct 30, 2017
One-click install
npx skills add https://github.com/1natsu172/dotfiles --skill use-dom-1natsu172
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/1natsu172/dotfiles/tree/main/.agents/skills/use-dom
Command: npx skills add https://github.com/1natsu172/dotfiles --skill use-dom-1natsu172

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable web-centric React components to run inside a native app via a WebView and render unchanged on the web.

Core Features & Use Cases

  • Cross-platform webviews: reuse web libraries and HTML/CSS-heavy UI in Expo apps across iOS, Android, and Web.
  • Incremental migration: migrate existing web code to native incrementally without a full rewrite.
  • Use cases include embedding charts, syntax highlighting, or iframes in a native app while keeping web behavior consistent.

Quick Start

Create a new file with 'use dom' at the top and export a default React 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 reuse web UI components inside a React Native app?

To run web UIs in Expo, create a file with the 'use dom' directive at the top and export a default React component. This renders the component in a native WebView on iOS and Android, and directly on the web.

Can I migrate an existing web codebase to Expo without a full rewrite?

Yes, you can migrate existing web code to native incrementally by reusing web libraries and HTML/CSS-heavy UI. The 'use dom' directive allows web components to run unchanged in a native WebView without requiring a full rewrite.

Does Expo DOM support embedding complex HTML and CSS like charts or iframes?

Yes, Expo DOM supports embedding complex HTML, CSS, charts, syntax highlighting, and iframes in a native app. Web components render inside a WebView on native platforms while maintaining consistent web behavior.

What are the requirements for using the 'use dom' directive in Expo?

Using the 'use dom' directive requires a single default-exported React component per file, explicit props typing for the dom prop, DOM-specific usage patterns including CSS in DOM components, and router integration for cross-platform rendering.

Are there limitations when running web libraries in a native WebView?

Limitations include requiring a single default-exported component per file and explicit props typing for the dom prop. Web components must follow DOM-specific usage patterns, and complex router integration requires careful configuration across platforms.