Back to skills

use-dom

development

expo/use-dom lets you run React web components inside a webview on iOS and Android while rendering them natively on web. Add the 'use dom' directive to a file and it works with web-only libraries like

Setup & Installation

npx skills add https://github.com/expo/use-dom --skill use-dom
or paste the link and ask your coding assistant to install it
https://github.com/expo/use-dom
View on GitHub

What This Skill Does

expo/use-dom lets you run React web components inside a webview on iOS and Android while rendering them natively on web. Add the 'use dom' directive to a file and it works with web-only libraries like recharts or react-syntax-highlighter without rewriting anything. Props passed from native code are serialized automatically, and async functions become a bridge between the webview and native APIs. Instead of rewriting web components using React Native primitives or finding native equivalents for every web library, you drop in the 'use dom' directive and the component runs as-is on native, with no separate WebView setup or postMessage wiring required.

When to use it

  • Working with use dom functionality
  • Implementing use dom features
  • Debugging use dom related issues