use-dom

Render web code in a DOM-enabled webview within React Native apps.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries and React web components in your Expo app without rewriting.

Core Features & Use Cases

  • Run web code inside native apps via a webview while preserving web behavior on web.
  • Reuse existing web libraries (for example charts or syntax highlighters) without rewriting for native.
  • Migrate web code to native incrementally, reducing rewrite effort.

Quick Start

Create a DOM component file that begins with the directive 'use dom' and export a default React component to render inside a native screen.

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 app without rewriting it?

You can run web code inside a React Native app by using DOM components, which render web code verbatim in a webview on native platforms while preserving web behavior on web. This allows you to reuse existing web libraries without rewriting them for native.

Can I use existing web libraries like charts and syntax highlighters in Expo?

Yes, you can use existing web libraries like charts or syntax highlighters in Expo by wrapping them in DOM components. This bridges web libraries with native platforms, enabling reuse of web UI components without rewriting them for native.

How do I create a DOM component in React Native?

To create a DOM component, make a file that begins with the directive 'use dom' and export a default React component. This file can also support per-file DOM props, optional scripts, references, or asset directories as needed.

Does migrating web code to native require rewriting the entire application?

Migrating web code to native does not require rewriting the entire application. DOM components allow you to migrate web code to native incrementally by rendering web code in a webview, reducing rewrite effort.

What is the 'use dom' directive used for in React Native?

The 'use dom' directive is placed at the top of a DOM component file to enable web code to run in a DOM-enabled context within native apps. It bridges web libraries with native platforms by rendering the exported React component inside a native screen.