expo-dom

Execute React web code in Expo native webviews via the DOM module.

2.4k|125|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/expo/skills --skill expo-dom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-dom
Source: https://github.com/expo/skills/tree/main/plugins/expo/skills/expo-dom
Command: npx skills add https://github.com/expo/skills --skill expo-dom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react, expo-dom, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers integrate web components into their Expo applications, enabling the use of web libraries on native platforms without rewriting code.

Core Features & Use Cases

  • DOM Component Usage: Run React web code in Expo webviews while preserving the same functionality on the web.
  • Web Code Migration: Gradually migrate existing React web components to native.
  • Use Case: Migrate a web-only chart library into an Expo app without modifying the chart's code.

Quick Start

Add a 'use dom' directive to your React component file and import your web library to render it within an Expo app.

Frequently Asked Questions about expo-dom

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

FAQPage Schema
How do I run web code natively in Expo without rewriting it for React Native?

You can run web code natively in Expo by adding a 'use dom' directive to your React component file, which executes the JavaScript within native webviews to preserve web library functionality.

Can I use web-only chart libraries in an Expo cross-platform application?

Yes, you can use web-only chart libraries in an Expo cross-platform application by wrapping the component with the 'use dom' directive, executing the web code in a native webview without modifying the chart's code.

What is the best way to gradually migrate React web components to native?

The best way to gradually migrate React web components to native is using Expo DOM components, allowing you to isolate and execute web libraries in webviews while developing native code alongside them.

Does Expo DOM support rendering web libraries on both web and native platforms?

Yes, Expo DOM supports rendering web libraries on both web and native platforms by executing JavaScript code within native webviews while preserving the same functionality on the web.

What are the performance implications of using DOM components in Expo?

Using DOM components in Expo introduces performance implications related to platform-specific behavior and webview overhead, requiring developers to consider execution boundaries when integrating web libraries natively.

Do I need React and Expo's DOM module to enable cross-platform compatibility?

Yes, you need React and Expo's DOM module to enable cross-platform compatibility, as these dependencies provide the necessary directives and webview execution environment for web code integration.