Skip to main content
Back to registry

use-dom

expo/skills

DOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries like recharts , react-syntax-highlighter , or any React web library in your Expo app without modification.

Installs7
Install command
npx skills add https://github.com/expo/skills --skill use-dom
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
DOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries like recharts , react-syntax-highlighter , or any React web library in your Expo app without modification. Use DOM components when you need: Avoid DOM components when: Create a new file with the 'use dom'; directive at the top: Every DOM component receives a special dom prop for webview configuration. Always type it in your props: Pass async functions as props to expose native functionality to the DOM component: DOM components can use any web library: CSS imports must be in the DOM component file since they run in isolated context: Or use inline styles / CSS-in-JS: The expo-router component and router API work inside DOM components: These hooks don't work directly in DOM components because they need synchronous access to native routing state: Solution: Read these values in the native parent and pass as props: Check if code is running in a DOM component: Prefer requiring assets instead of using the public directory: Import and use DOM components like regular components: On web, the dom prop is ignored since no webview is needed. - Web-only libraries — Charts (recharts, chart.js), syntax highlighters, rich text editors, or any library that depends on DOM APIs - Migrating web code — Bring existing React web components to native without...

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does use-dom do?

DOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries like recharts , react-syntax-highlighter , or any React web library in your Expo app without modification.

Is use-dom good?

use-dom does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does use-dom work with?

use-dom currently lists compatibility with Agent compatibility has not been published yet..

What are alternatives to use-dom?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install use-dom?

npx skills add https://github.com/expo/skills --skill use-dom

Related skills

More from expo/skills

Related skills

Alternatives in Software Engineering