use-dom

Run DOM-dependent React components inside an Expo app's webview.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/lexand-dev/subtrack-monorepo --skill use-dom-lexand-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/lexand-dev/subtrack-monorepo/tree/main/.agents/skills/use-dom
Command: npx skills add https://github.com/lexand-dev/subtrack-monorepo --skill use-dom-lexand-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows you to run web-only libraries and code directly within your native Expo application, bridging the gap between web and mobile development.

Core Features & Use Cases

  • Web-only Libraries: Integrate libraries like Recharts, Chart.js, or any React web component that relies on DOM APIs.
  • Incremental Migration: Gradually bring existing React web components to your native app without a full rewrite.
  • Complex Layouts: Utilize advanced CSS features not available in React Native.
  • Use Case: Embed a complex charting library like Recharts into your Expo app to visualize data, which would otherwise require a separate web implementation.

Quick Start

Create a new file with the 'use dom'; directive at the top to define 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-only React libraries like Recharts inside an Expo app?

You can run web-only React libraries like Recharts inside an Expo app by using the 'use dom' directive to execute web-specific components within a native webview. This bridges web and mobile code without requiring a separate implementation.

Can I migrate an existing React web codebase to mobile incrementally?

Incremental migration of a React web codebase to mobile is supported by rendering existing DOM-dependent components inside a native webview. You can gradually bring web components to your Expo application without performing a full rewrite.

How do I use complex CSS layouts that are not available in React Native?

Complex CSS layouts unavailable in React Native can be utilized by defining a DOM component with the 'use dom' directive. This renders the advanced HTML and CSS within an embedded webview context in your Expo app.

Does the 'use dom' directive support passing props to the webview context?

Passing serializable props to the webview context is fully supported, and you can also expose native actions back to the webview. This bidirectional communication allows web components to interact with your native Expo application logic.

What are the limitations of running web code natively in a React Native webview?

Running web code natively inside a webview requires props to be serializable, meaning non-serializable objects or functions cannot be passed directly. DOM-dependent code is also isolated from native React Native components.

Do I need a full web view setup to integrate Chart.js into my Expo application?

A full manual webview setup is not needed to integrate Chart.js into an Expo application. You can define a web component using the 'use dom' directive to execute the charting library directly within the native environment.