use-dom

Run web code in Expo React Native apps using DOM components.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ashleytower/claude-code-workflow --skill use-dom-ashleytower
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/ashleytower/claude-code-workflow/tree/main/skills/use-dom
Command: npx skills add https://github.com/ashleytower/claude-code-workflow --skill use-dom-ashleytower

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Web and native platforms often require separate codebases; this skill lets you run web code verbatim in a webview on native apps while rendering as-is on web, enabling reuse of web libraries in Expo apps without rewriting.

Core Features & Use Cases

  • Embedding web UI in native apps using a webview without porting code.
  • Migrating web components to native incrementally while maintaining behavior.
  • Use case: porting charts or rich content libraries that rely on DOM APIs into Expo apps.

Quick Start

Create a new file using the 'use dom' directive at the top and wrap your web-based React code inside a DOM 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 a React Native Expo app?

You can run web code in a React Native Expo app by using the 'use dom' directive to render web-based React components inside a webview, enabling verbatim reuse of web libraries without porting.

What is the best way to reuse web libraries that rely on the DOM in Expo?

The best way to reuse DOM-dependent web libraries in Expo is embedding them as DOM components, which render inside a native webview while maintaining their original behavior without requiring a rewrite.

Can I migrate web components to native UIs incrementally?

Yes, you can migrate web components to native UIs incrementally by wrapping web-based React code in DOM components, allowing you to maintain behavior while transitioning your codebase.

Does the 'use dom' directive require specific file structure rules?

The 'use dom' directive enforces specific file structure rules, requiring exactly one default export per file and proper DOMProps typing to ensure the webview renders the web code correctly.

How do I isolate CSS when embedding web content in native apps?

You can isolate CSS when embedding web content in native apps by utilizing the optional CSS isolation feature provided by DOM components, preventing style conflicts between the webview and native UI.

When should I avoid using a webview for web-to-native migration?

You should avoid using a webview for web-to-native migration if your web components do not rely heavily on DOM APIs, as direct native ports may offer better performance than rendering inside a webview.