use-dom

Execute web-based React components in Expo apps via DOM webviews.

18|Updated Jul 23, 2025
One-click install
npx skills add https://github.com/faw01/create-mf2-app --skill use-dom-faw01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/faw01/create-mf2-app/tree/main/apps/cli/template/.agents/skills/use-dom
Command: npx skills add https://github.com/faw01/create-mf2-app --skill use-dom-faw01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the challenge of integrating web-only libraries and complex HTML/CSS layouts into React Native applications by allowing web code to run verbatim in a webview while maintaining native performance for the rest of the app.

Core Features & Use Cases

  • Web-to-Native Migration: Easily bring existing React web components into Expo without rewriting them for native APIs.
  • Library Support: Use web-only libraries like recharts, react-syntax-highlighter, or rich text editors directly in your mobile app.
  • Use Case: If you need to display a complex interactive chart that is only available as a web library, use this skill to wrap the component in a DOM component to render it seamlessly within your native screen.

Quick Start

Use the use-dom skill to migrate the existing web component WebChart.tsx into the current Expo project by adding the use dom directive and configuring the necessary DOM props.

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 React components in a native Expo application?

To run web React components in a native Expo application, use the use-dom skill to wrap them in DOM components and execute the web code verbatim within isolated webviews.

Can I use web-only libraries like recharts in React Native?

Yes, you can use web-only libraries like recharts or rich text editors in React Native by wrapping them in DOM components that render seamlessly within native screens via isolated webview contexts.

What is the use dom directive in Expo?

The use dom directive is an Expo architecture feature that bridges native actions with webview-based UI elements, requiring proper serialization of props to execute web-based React components within native environments.

How do I migrate a web component to an Expo project?

To migrate a web component to an Expo project, add the use dom directive to your existing web component file and configure the necessary DOM props to bridge native actions with the webview context.

Does running web code in Expo webviews affect native performance?

Running web code in Expo webviews maintains native performance for the rest of your application by isolating complex HTML, CSS layouts, and web-only libraries inside the webview context.

When should I use DOM components instead of rewriting web code for native APIs?

Use DOM components instead of rewriting web code for native APIs when you need to integrate complex interactive charts, web-only libraries, or intricate CSS layouts into your mobile environment without rewriting them.