use-dom

Run web code in native Expo apps using DOM components.

2|Updated Aug 26, 2023
One-click install
npx skills add https://github.com/VaggelisKa/subscriptions-manager --skill use-dom-vaggeliska
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-dom
Source: https://github.com/VaggelisKa/subscriptions-manager/tree/main/.agents/skills/use-dom
Command: npx skills add https://github.com/VaggelisKa/subscriptions-manager --skill use-dom-vaggeliska

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expo DOM components enable web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables reusing web libraries and UI without rewriting for native.

Core Features & Use Cases

  • Embed web UI and DOM-based components inside native Expo apps using a dedicated DOM component runtime.
  • Migrate existing web code to native incrementally without rewriting logic or components.
  • Use web libraries (charts, editors, HTML content) inside native apps with configured DOM props.

Quick Start

Create a DOM component file with the 'use dom' directive at the top and a single default export that renders a React component inside a native app.

Frequently Asked Questions about use-dom

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

FAQPage Schema
How do I embed web UI inside a native Expo app without rewriting it?

You can embed web UI in a native Expo app by using Expo DOM components, which run web code verbatim in a webview on native while rendering as-is on web. This allows reusing web libraries and UI without rewriting them for native.

What is the best way to migrate a web project to React Native incrementally?

The best way to migrate a web project to React Native incrementally is using Expo DOM components. This approach lets you integrate web libraries and UI into your native app piece by piece without rewriting existing logic or components.

How do I set up a DOM component file for use in React Native?

To set up a DOM component file, add the 'use dom' directive at the top and include a single default export that renders a React component. You must create a dedicated component file per DOM component and provide a 'dom' prop for configuration.

Can I use web libraries like charts and editors inside an Expo native app?

Yes, you can use web libraries like charts and editors inside an Expo native app by wrapping them in DOM components. The code runs inside a native webview across iOS, Android, and Web platforms without requiring native rewrites.

What are the limitations of using webviews for web embedding in Expo?

Limitations of using webviews for web embedding in Expo include strict file requirements: each DOM component needs a dedicated file, a 'use dom' directive at the top, a single default export, and a 'dom' prop for proper configuration.