@punks/cli 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/BASELINE_CHANGELOG.md +50 -0
  2. package/dist/CHANGELOG.md +50 -0
  3. package/dist/index.js +216 -221
  4. package/dist/skills/agnostic/cli/dp-cli/SKILL.md +1 -12
  5. package/dist/skills/agnostic/cli/dp-cli/references/commands.md +22 -18
  6. package/dist/skills/agnostic/cli/dp-cli/references/post-command-flow.md +15 -19
  7. package/dist/skills/agnostic/planning/wayfinder/SKILL.md +42 -0
  8. package/dist/skills/agnostic/quality/review/SKILL.md +89 -0
  9. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +22 -0
  10. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +110 -23
  11. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +30 -14
  12. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +74 -7
  13. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +108 -2
  14. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +29 -3
  15. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +43 -7
  16. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +25 -3
  17. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +63 -14
  18. package/dist/skills/agnostic/research/parallel-research/SKILL.md +5 -2
  19. package/dist/skills/frameworks/expo/add-app-clip/SKILL.md +280 -0
  20. package/dist/skills/frameworks/expo/add-app-clip/agents/openai.yaml +4 -0
  21. package/dist/skills/frameworks/expo/add-app-clip/references/native-module.md +96 -0
  22. package/dist/skills/frameworks/expo/building-native-ui/SKILL.md +377 -0
  23. package/dist/skills/frameworks/expo/building-native-ui/agents/openai.yaml +4 -0
  24. package/dist/skills/frameworks/expo/building-native-ui/references/animations.md +220 -0
  25. package/dist/skills/frameworks/expo/building-native-ui/references/controls.md +270 -0
  26. package/dist/skills/frameworks/expo/building-native-ui/references/form-sheet.md +253 -0
  27. package/dist/skills/frameworks/expo/building-native-ui/references/gradients.md +106 -0
  28. package/dist/skills/frameworks/expo/building-native-ui/references/icons.md +213 -0
  29. package/dist/skills/frameworks/expo/building-native-ui/references/media.md +198 -0
  30. package/dist/skills/frameworks/expo/building-native-ui/references/route-structure.md +229 -0
  31. package/dist/skills/frameworks/expo/building-native-ui/references/search.md +248 -0
  32. package/dist/skills/frameworks/expo/building-native-ui/references/storage.md +121 -0
  33. package/dist/skills/frameworks/expo/building-native-ui/references/tabs.md +433 -0
  34. package/dist/skills/frameworks/expo/building-native-ui/references/toolbar-and-headers.md +284 -0
  35. package/dist/skills/frameworks/expo/building-native-ui/references/visual-effects.md +197 -0
  36. package/dist/skills/frameworks/expo/building-native-ui/references/webgpu-three.md +605 -0
  37. package/dist/skills/frameworks/expo/building-native-ui/references/zoom-transitions.md +158 -0
  38. package/dist/skills/frameworks/expo/eas-simulator/SKILL.md +154 -0
  39. package/dist/skills/frameworks/expo/eas-simulator/references/controllers.md +67 -0
  40. package/dist/skills/frameworks/expo/eas-simulator/references/run-your-app.md +185 -0
  41. package/dist/skills/frameworks/expo/eas-simulator/references/troubleshooting.md +38 -0
  42. package/dist/skills/frameworks/expo/eas-update-insights/SKILL.md +228 -0
  43. package/dist/skills/frameworks/expo/eas-update-insights/agents/openai.yaml +4 -0
  44. package/dist/skills/frameworks/expo/eas-update-insights/references/channel-insights-schema.md +47 -0
  45. package/dist/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +69 -0
  46. package/dist/skills/frameworks/expo/expo-api-routes/SKILL.md +368 -0
  47. package/dist/skills/frameworks/expo/expo-api-routes/agents/openai.yaml +4 -0
  48. package/dist/skills/frameworks/expo/expo-brownfield/SKILL.md +54 -0
  49. package/dist/skills/frameworks/expo/expo-brownfield/agents/openai.yaml +4 -0
  50. package/dist/skills/frameworks/expo/expo-brownfield/references/brownfield-integrated.md +526 -0
  51. package/dist/skills/frameworks/expo/expo-brownfield/references/brownfield-isolated.md +402 -0
  52. package/dist/skills/frameworks/expo/expo-brownfield/references/comparison.md +63 -0
  53. package/dist/skills/frameworks/expo/expo-brownfield/references/troubleshooting.md +88 -0
  54. package/dist/skills/frameworks/expo/expo-cicd-workflows/SKILL.md +92 -0
  55. package/dist/skills/frameworks/expo/expo-cicd-workflows/agents/openai.yaml +4 -0
  56. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/fetch.js +109 -0
  57. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/package.json +11 -0
  58. package/dist/skills/frameworks/expo/expo-cicd-workflows/scripts/validate.js +84 -0
  59. package/dist/skills/frameworks/expo/expo-deployment/SKILL.md +167 -0
  60. package/dist/skills/frameworks/expo/expo-deployment/agents/openai.yaml +4 -0
  61. package/dist/skills/frameworks/expo/expo-deployment/references/app-store-metadata.md +497 -0
  62. package/dist/skills/frameworks/expo/expo-deployment/references/ios-app-store.md +371 -0
  63. package/dist/skills/frameworks/expo/expo-deployment/references/play-store.md +246 -0
  64. package/dist/skills/frameworks/expo/expo-deployment/references/testflight.md +58 -0
  65. package/dist/skills/frameworks/expo/expo-deployment/references/workflows.md +160 -0
  66. package/dist/skills/frameworks/expo/expo-dev-client/SKILL.md +172 -0
  67. package/dist/skills/frameworks/expo/expo-dev-client/agents/openai.yaml +4 -0
  68. package/dist/skills/frameworks/expo/expo-examples/SKILL.md +97 -0
  69. package/dist/skills/frameworks/expo/expo-examples/references/catalog.md +105 -0
  70. package/dist/skills/frameworks/expo/expo-module/SKILL.md +141 -0
  71. package/dist/skills/frameworks/expo/expo-module/agents/openai.yaml +4 -0
  72. package/dist/skills/frameworks/expo/expo-module/references/config-plugin.md +90 -0
  73. package/dist/skills/frameworks/expo/expo-module/references/create-expo-module.md +206 -0
  74. package/dist/skills/frameworks/expo/expo-module/references/lifecycle.md +127 -0
  75. package/dist/skills/frameworks/expo/expo-module/references/module-config.md +48 -0
  76. package/dist/skills/frameworks/expo/expo-module/references/native-module.md +286 -0
  77. package/dist/skills/frameworks/expo/expo-module/references/native-view.md +171 -0
  78. package/dist/skills/frameworks/expo/expo-observe/SKILL.md +29 -0
  79. package/dist/skills/frameworks/expo/expo-observe/references/metrics.md +47 -0
  80. package/dist/skills/frameworks/expo/expo-observe/references/queries.md +342 -0
  81. package/dist/skills/frameworks/expo/expo-observe/references/setup.md +255 -0
  82. package/dist/skills/frameworks/expo/expo-skill-eval/SKILL.md +314 -0
  83. package/dist/skills/frameworks/expo/expo-skill-eval/agents/visual-grader.md +52 -0
  84. package/dist/skills/frameworks/expo/expo-skill-eval/references/design-rubric.md +45 -0
  85. package/dist/skills/frameworks/expo/expo-skill-eval/references/runtime-matrix.md +33 -0
  86. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/check-static.sh +64 -0
  87. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/clean-fixture.sh +56 -0
  88. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/generate_viewer.py +450 -0
  89. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/latest-sdk.sh +46 -0
  90. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/make-fixture.sh +95 -0
  91. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/make-workspace.sh +31 -0
  92. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-android.sh +284 -0
  93. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
  94. package/dist/skills/frameworks/expo/expo-skill-eval/scripts/snapshot-web.sh +61 -0
  95. package/dist/skills/frameworks/expo/expo-tailwind-setup/SKILL.md +480 -0
  96. package/dist/skills/frameworks/expo/expo-tailwind-setup/agents/openai.yaml +4 -0
  97. package/dist/skills/frameworks/expo/expo-ui/SKILL.md +47 -0
  98. package/dist/skills/frameworks/expo/expo-ui/agents/openai.yaml +4 -0
  99. package/dist/skills/frameworks/expo/expo-ui/references/drop-in-replacements.md +27 -0
  100. package/dist/skills/frameworks/expo/expo-ui/references/jetpack-compose.md +73 -0
  101. package/dist/skills/frameworks/expo/expo-ui/references/swift-ui.md +73 -0
  102. package/dist/skills/frameworks/expo/expo-ui/references/universal.md +73 -0
  103. package/dist/skills/frameworks/expo/expo-ui/scripts/list-components.js +193 -0
  104. package/dist/skills/frameworks/expo/native-data-fetching/SKILL.md +505 -0
  105. package/dist/skills/frameworks/expo/native-data-fetching/agents/openai.yaml +4 -0
  106. package/dist/skills/frameworks/expo/native-data-fetching/references/expo-router-loaders.md +341 -0
  107. package/dist/skills/frameworks/expo/upgrading-expo/SKILL.md +134 -0
  108. package/dist/skills/frameworks/expo/upgrading-expo/agents/openai.yaml +4 -0
  109. package/dist/skills/frameworks/expo/upgrading-expo/references/expo-av-to-audio.md +132 -0
  110. package/dist/skills/frameworks/expo/upgrading-expo/references/expo-av-to-video.md +160 -0
  111. package/dist/skills/frameworks/expo/upgrading-expo/references/native-tabs.md +124 -0
  112. package/dist/skills/frameworks/expo/upgrading-expo/references/new-architecture.md +79 -0
  113. package/dist/skills/frameworks/expo/upgrading-expo/references/react-19.md +79 -0
  114. package/dist/skills/frameworks/expo/upgrading-expo/references/react-compiler.md +59 -0
  115. package/dist/skills/frameworks/expo/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
  116. package/dist/skills/frameworks/expo/use-dom/SKILL.md +417 -0
  117. package/dist/skills/frameworks/expo/use-dom/agents/openai.yaml +4 -0
  118. package/dist/skills/frameworks/expo/web-to-native/SKILL.md +83 -0
  119. package/dist/skills/frameworks/expo/web-to-native/references/false-friends.md +119 -0
  120. package/dist/skills/frameworks/expo/web-to-native/references/native-patterns.md +39 -0
  121. package/dist/skills/frameworks/expo/web-to-native/references/run-as-goal.md +48 -0
  122. package/dist/skills/frameworks/expo/web-to-native/references/verify-on-device.md +45 -0
  123. package/dist/skills/phases/finder-phase/SKILL.md +52 -0
  124. package/dist/skills/phases/finder-phase/references/frontier-lifecycle.md +70 -0
  125. package/dist/skills/phases/finder-phase/references/root-routing.md +29 -0
  126. package/dist/skills/phases/goalify/SKILL.md +10 -7
  127. package/dist/skills/phases/review-phase/REFERENCE.md +36 -3
  128. package/dist/skills/phases/review-phase/SKILL.md +18 -11
  129. package/package.json +1 -1
@@ -0,0 +1,417 @@
1
+ ---
2
+ name: use-dom
3
+ description: Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.
4
+ version: 1.0.0
5
+ license: MIT
6
+ ---
7
+
8
+ ## What are DOM Components?
9
+
10
+ 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.
11
+
12
+ ## When to Use DOM Components
13
+
14
+ Use DOM components when you need:
15
+
16
+ - **Web-only libraries** — Charts (recharts, chart.js), syntax highlighters, rich text editors, or any library that depends on DOM APIs
17
+ - **Migrating web code** — Bring existing React web components to native without rewriting
18
+ - **Complex HTML/CSS layouts** — When CSS features aren't available in React Native
19
+ - **iframes or embeds** — Embedding external content that requires a browser context
20
+ - **Canvas or WebGL** — Web graphics APIs not available natively
21
+
22
+ ## When NOT to Use DOM Components
23
+
24
+ Avoid DOM components when:
25
+
26
+ - **Native performance is critical** — Webviews add overhead
27
+ - **Simple UI** — React Native components are more efficient for basic layouts
28
+ - **Deep native integration** — Use local modules instead for native APIs
29
+ - **Layout routes** — `_layout` files cannot be DOM components
30
+
31
+ ## Basic DOM Component
32
+
33
+ Create a new file with the `'use dom';` directive at the top:
34
+
35
+ ```tsx
36
+ // components/WebChart.tsx
37
+ "use dom";
38
+
39
+ export default function WebChart({
40
+ data,
41
+ }: {
42
+ data: number[];
43
+ dom: import("expo/dom").DOMProps;
44
+ }) {
45
+ return (
46
+ <div style={{ padding: 20 }}>
47
+ <h2>Chart Data</h2>
48
+ <ul>
49
+ {data.map((value, i) => (
50
+ <li key={i}>{value}</li>
51
+ ))}
52
+ </ul>
53
+ </div>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ## Rules for DOM Components
59
+
60
+ 1. **Must have `'use dom';` directive** at the top of the file
61
+ 2. **Single default export** — One React component per file
62
+ 3. **Own file** — Cannot be defined inline or combined with native components
63
+ 4. **Serializable props only** — Strings, numbers, booleans, arrays, plain objects
64
+ 5. **Include CSS in the component file** — DOM components run in isolated context
65
+
66
+ ## The `dom` Prop
67
+
68
+ Every DOM component receives a special `dom` prop for webview configuration. Always type it in your props:
69
+
70
+ ```tsx
71
+ "use dom";
72
+
73
+ interface Props {
74
+ content: string;
75
+ dom: import("expo/dom").DOMProps;
76
+ }
77
+
78
+ export default function MyComponent({ content }: Props) {
79
+ return <div>{content}</div>;
80
+ }
81
+ ```
82
+
83
+ ### Common `dom` Prop Options
84
+
85
+ ```tsx
86
+ // Disable body scrolling
87
+ <DOMComponent dom={{ scrollEnabled: false }} />
88
+
89
+ // Flow under the notch (disable safe area insets)
90
+ <DOMComponent dom={{ contentInsetAdjustmentBehavior: "never" }} />
91
+
92
+ // Control size manually
93
+ <DOMComponent dom={{ style: { width: 300, height: 400 } }} />
94
+
95
+ // Combine options
96
+ <DOMComponent
97
+ dom={{
98
+ scrollEnabled: false,
99
+ contentInsetAdjustmentBehavior: "never",
100
+ style: { width: '100%', height: 500 }
101
+ }}
102
+ />
103
+ ```
104
+
105
+ ## Exposing Native Actions to the Webview
106
+
107
+ Pass async functions as props to expose native functionality to the DOM component:
108
+
109
+ ```tsx
110
+ // app/index.tsx (native)
111
+ import { Alert } from "react-native";
112
+ import DOMComponent from "@/components/dom-component";
113
+
114
+ export default function Screen() {
115
+ return (
116
+ <DOMComponent
117
+ showAlert={async (message: string) => {
118
+ Alert.alert("From Web", message);
119
+ }}
120
+ saveData={async (data: { name: string; value: number }) => {
121
+ // Save to native storage, database, etc.
122
+ console.log("Saving:", data);
123
+ return { success: true };
124
+ }}
125
+ />
126
+ );
127
+ }
128
+ ```
129
+
130
+ ```tsx
131
+ // components/dom-component.tsx
132
+ "use dom";
133
+
134
+ interface Props {
135
+ showAlert: (message: string) => Promise<void>;
136
+ saveData: (data: {
137
+ name: string;
138
+ value: number;
139
+ }) => Promise<{ success: boolean }>;
140
+ dom?: import("expo/dom").DOMProps;
141
+ }
142
+
143
+ export default function DOMComponent({ showAlert, saveData }: Props) {
144
+ const handleClick = async () => {
145
+ await showAlert("Hello from the webview!");
146
+ const result = await saveData({ name: "test", value: 42 });
147
+ console.log("Save result:", result);
148
+ };
149
+
150
+ return <button onClick={handleClick}>Trigger Native Action</button>;
151
+ }
152
+ ```
153
+
154
+ ## Using Web Libraries
155
+
156
+ DOM components can use any web library:
157
+
158
+ ```tsx
159
+ // components/syntax-highlight.tsx
160
+ "use dom";
161
+
162
+ import SyntaxHighlighter from "react-syntax-highlighter";
163
+ import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs";
164
+
165
+ interface Props {
166
+ code: string;
167
+ language: string;
168
+ dom?: import("expo/dom").DOMProps;
169
+ }
170
+
171
+ export default function SyntaxHighlight({ code, language }: Props) {
172
+ return (
173
+ <SyntaxHighlighter language={language} style={docco}>
174
+ {code}
175
+ </SyntaxHighlighter>
176
+ );
177
+ }
178
+ ```
179
+
180
+ ```tsx
181
+ // components/chart.tsx
182
+ "use dom";
183
+
184
+ import {
185
+ LineChart,
186
+ Line,
187
+ XAxis,
188
+ YAxis,
189
+ CartesianGrid,
190
+ Tooltip,
191
+ } from "recharts";
192
+
193
+ interface Props {
194
+ data: Array<{ name: string; value: number }>;
195
+ dom: import("expo/dom").DOMProps;
196
+ }
197
+
198
+ export default function Chart({ data }: Props) {
199
+ return (
200
+ <LineChart width={400} height={300} data={data}>
201
+ <CartesianGrid strokeDasharray="3 3" />
202
+ <XAxis dataKey="name" />
203
+ <YAxis />
204
+ <Tooltip />
205
+ <Line type="monotone" dataKey="value" stroke="#8884d8" />
206
+ </LineChart>
207
+ );
208
+ }
209
+ ```
210
+
211
+ ## CSS in DOM Components
212
+
213
+ CSS imports must be in the DOM component file since they run in isolated context:
214
+
215
+ ```tsx
216
+ // components/styled-component.tsx
217
+ "use dom";
218
+
219
+ import "@/styles.css"; // CSS file in same directory
220
+
221
+ export default function StyledComponent({
222
+ dom,
223
+ }: {
224
+ dom: import("expo/dom").DOMProps;
225
+ }) {
226
+ return (
227
+ <div className="container">
228
+ <h1 className="title">Styled Content</h1>
229
+ </div>
230
+ );
231
+ }
232
+ ```
233
+
234
+ Or use inline styles / CSS-in-JS:
235
+
236
+ ```tsx
237
+ "use dom";
238
+
239
+ const styles = {
240
+ container: {
241
+ padding: 20,
242
+ backgroundColor: "#f0f0f0",
243
+ },
244
+ title: {
245
+ fontSize: 24,
246
+ color: "#333",
247
+ },
248
+ };
249
+
250
+ export default function StyledComponent({
251
+ dom,
252
+ }: {
253
+ dom: import("expo/dom").DOMProps;
254
+ }) {
255
+ return (
256
+ <div style={styles.container}>
257
+ <h1 style={styles.title}>Styled Content</h1>
258
+ </div>
259
+ );
260
+ }
261
+ ```
262
+
263
+ ## Expo Router in DOM Components
264
+
265
+ The expo-router `<Link />` component and router API work inside DOM components:
266
+
267
+ ```tsx
268
+ "use dom";
269
+
270
+ import { Link, useRouter } from "expo-router";
271
+
272
+ export default function Navigation({
273
+ dom,
274
+ }: {
275
+ dom: import("expo/dom").DOMProps;
276
+ }) {
277
+ const router = useRouter();
278
+
279
+ return (
280
+ <nav>
281
+ <Link href="/about">About</Link>
282
+ <button onClick={() => router.push("/settings")}>Settings</button>
283
+ </nav>
284
+ );
285
+ }
286
+ ```
287
+
288
+ ### Router APIs That Require Props
289
+
290
+ These hooks don't work directly in DOM components because they need synchronous access to native routing state:
291
+
292
+ - `useLocalSearchParams()`
293
+ - `useGlobalSearchParams()`
294
+ - `usePathname()`
295
+ - `useSegments()`
296
+ - `useRootNavigation()`
297
+ - `useRootNavigationState()`
298
+
299
+ **Solution:** Read these values in the native parent and pass as props:
300
+
301
+ ```tsx
302
+ // app/[id].tsx (native)
303
+ import { useLocalSearchParams, usePathname } from "expo-router";
304
+ import DOMComponent from "@/components/dom-component";
305
+
306
+ export default function Screen() {
307
+ const { id } = useLocalSearchParams();
308
+ const pathname = usePathname();
309
+
310
+ return <DOMComponent id={id as string} pathname={pathname} />;
311
+ }
312
+ ```
313
+
314
+ ```tsx
315
+ // components/dom-component.tsx
316
+ "use dom";
317
+
318
+ interface Props {
319
+ id: string;
320
+ pathname: string;
321
+ dom?: import("expo/dom").DOMProps;
322
+ }
323
+
324
+ export default function DOMComponent({ id, pathname }: Props) {
325
+ return (
326
+ <div>
327
+ <p>Current ID: {id}</p>
328
+ <p>Current Path: {pathname}</p>
329
+ </div>
330
+ );
331
+ }
332
+ ```
333
+
334
+ ## Detecting DOM Environment
335
+
336
+ Check if code is running in a DOM component:
337
+
338
+ ```tsx
339
+ "use dom";
340
+
341
+ import { IS_DOM } from "expo/dom";
342
+
343
+ export default function Component({
344
+ dom,
345
+ }: {
346
+ dom?: import("expo/dom").DOMProps;
347
+ }) {
348
+ return <div>{IS_DOM ? "Running in DOM component" : "Running natively"}</div>;
349
+ }
350
+ ```
351
+
352
+ ## Assets
353
+
354
+ Prefer requiring assets instead of using the public directory:
355
+
356
+ ```tsx
357
+ "use dom";
358
+
359
+ // Good - bundled with the component
360
+ const logo = require("../assets/logo.png");
361
+
362
+ export default function Component({
363
+ dom,
364
+ }: {
365
+ dom: import("expo/dom").DOMProps;
366
+ }) {
367
+ return <img src={logo} alt="Logo" />;
368
+ }
369
+ ```
370
+
371
+ ## Usage from Native Components
372
+
373
+ Import and use DOM components like regular components:
374
+
375
+ ```tsx
376
+ // app/index.tsx
377
+ import { View, Text } from "react-native";
378
+ import WebChart from "@/components/web-chart";
379
+ import CodeBlock from "@/components/code-block";
380
+
381
+ export default function HomeScreen() {
382
+ return (
383
+ <View style={{ flex: 1 }}>
384
+ <Text>Native content above</Text>
385
+
386
+ <WebChart data={[10, 20, 30, 40, 50]} dom={{ style: { height: 300 } }} />
387
+
388
+ <CodeBlock
389
+ code="const x = 1;"
390
+ language="javascript"
391
+ dom={{ scrollEnabled: true }}
392
+ />
393
+
394
+ <Text>Native content below</Text>
395
+ </View>
396
+ );
397
+ }
398
+ ```
399
+
400
+ ## Platform Behavior
401
+
402
+ | Platform | Behavior |
403
+ | -------- | ----------------------------------- |
404
+ | iOS | Rendered in WKWebView |
405
+ | Android | Rendered in WebView |
406
+ | Web | Rendered as-is (no webview wrapper) |
407
+
408
+ On web, the `dom` prop is ignored since no webview is needed.
409
+
410
+ ## Tips
411
+
412
+ - DOM components hot reload during development
413
+ - Keep DOM components focused — don't put entire screens in webviews
414
+ - Use native components for navigation chrome, DOM components for specialized content
415
+ - Test on all platforms — web rendering may differ slightly from native webviews
416
+ - Large DOM components may impact performance — profile if needed
417
+ - The webview has its own JavaScript context — cannot directly share state with native
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Use DOM"
3
+ short_description: "Use Expo DOM components to run web React code in native webviews and unchanged on web"
4
+ default_prompt: "Use $use-dom to migrate web components into Expo via 'use dom', configure DOM props, expose native actions safely, use web-only libraries, and keep DOM components separate from native routes."
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: web-to-native
3
+ description: Migrate an existing web React app to a native iOS/Android app with Expo. Use when the user wants to turn a website into a mobile app, port a Next.js/Vite/CRA React codebase to React Native, reuse web code on native incrementally, or asks how web idioms (the DOM, CSS, React Router, localStorage, window) map to native. This is the end-to-end migration guide; use the `use-dom` skill for the DOM-component mechanism itself.
4
+ version: 1.0.0
5
+ license: MIT
6
+ ---
7
+
8
+ # Web to Native
9
+
10
+ A web React app does not *convert* to native — there is no transpiler. It **migrates**, screen by screen, the way a strangler fig grows around a tree and slowly replaces it: stand up a native shell, run the whole web UI inside it on day one, then strangle each screen into native in priority order. This skill is the spine that orders the work; each step hands off to an existing Expo skill rather than re-explaining it. It operationalizes Expo's [From Web to Native with React](https://expo.dev/blog/from-web-to-native-with-react) — read that for the why.
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ A1[1 · Assess: write the worklist] --> A2[2 · Scaffold Expo shell]
15
+ A2 --> A3[3 · DOM-component shell<br/>· use-dom · SHIP DAY ONE]
16
+ A3 --> A4[4 · Strangle screens to native<br/>highest-value first · building-native-ui]
17
+ A4 -->|more screens| A4
18
+ A4 --> A5[5 · Wire data / auth / storage<br/>· native-data-fetching]
19
+ A5 --> A6[6 · Ship · expo-deployment]
20
+ ```
21
+
22
+ ## Principles
23
+
24
+ - **Migrate, don't rewrite.** Never big-bang it; every step keeps the app shippable.
25
+ - **Ship on day one.** The web UI runs in a DOM-component shell (step 3) before anything is nativized — that's the milestone; everything after is polish.
26
+ - **Strangle by value.** Nativize the hot screens; leave the rest in the webview. Each DOM screen carries a ~2 MB web runtime — reason enough not to ship everything as DOM.
27
+ - **Nativize means redesign, not reskin.** A strangled screen should look like Apple/Google shipped it, not the web page reskinned. **Reach for `@expo/ui` first** — it renders real SwiftUI/Compose, so it feels *exactly* like the OS; styled RN primitives are the fallback for custom layouts only. Plus platform navigation (`building-native-ui`: NativeTabs, large titles), liquid glass and native components via `@expo/ui`, and mobile UX (sheets, swipe, haptics). The web→native pattern map is [`./references/native-patterns.md`](./references/native-patterns.md). If it still feels like a website, you ported instead of redesigned.
28
+ - **Verify by running, not compiling.** A clean build proves nothing (a blank webview compiles fine). Run each screen — but judge *content and behavior* against the web original, not pixels (a nativized screen should look more native, not identical).
29
+ - **Orchestrate, don't reinvent.** Each step routes into an existing skill. The value here is the *order* and the *gotchas* — the idiom-by-idiom mappings live in [`./references/false-friends.md`](./references/false-friends.md).
30
+
31
+ ## Run it as a loop (recommended)
32
+
33
+ The migration is a long repeat-until-done loop, so the first move is to **write the goal objective and launch it** — not to grind screens by hand. Fill the objective in [`./references/run-as-goal.md`](./references/run-as-goal.md) for this app and present it; it **re-reads this skill every iteration**, so each `/goal` turn reloads the playbook + worklist and drives the next screen (it even self-bootstraps the assess step). Then run `/goal` with it — or, if the harness can't loop, write it to `migration-goal.md` and have the user launch it. The steps below are what each iteration does; run them by hand only if you're not looping.
34
+
35
+ ## The migration
36
+
37
+ > **No repo to migrate** — just building native fresh as a web dev? You don't need these steps: use `building-native-ui`, and keep [`./references/false-friends.md`](./references/false-friends.md) open for the web→native idiom map. Everything below assumes an existing web app.
38
+
39
+ ### 1. Assess → write the worklist
40
+
41
+ Read the repo and produce `migration-progress.md`, the durable worklist the rest of the migration checks off. Make two cuts:
42
+
43
+ - **Screens vs backend.** Page routes (`page.tsx`) are screens you migrate; server routes (`route.ts`), the ORM, and auth handlers stay server-side. Decide the backend once: keep it deployed (the native app becomes an HTTP client) or move it to EAS Hosting (`expo-api-routes`).
44
+ - **Bucket each screen** by how it should land: **port-as-is** (presentational → ships in a DOM webview), **nativize-now** (hot, or needs native feel — gestures, lists, keyboard), **nativize-later**, or **hybrid** (a native shell around a web sub-tree, e.g. a chat list wrapping a markdown renderer).
45
+
46
+ Note the framework signals as you read — RSC vs client, Tailwind/shadcn, where data is fetched — since they decide how each screen ports (false-friends has the mappings; async Server Components in particular must be split into a client fetch + a presentational component before they can move). **Flag third-party services/SDKs too** — browser SDKs don't carry over (`false-friends` → *Services & SDKs*); payments especially is a *fork, not a swap* (in-app digital goods must use store IAP via RevenueCat, ~30% — not Stripe), a business-model call to make now, not at App Store review. The worklist is only trustworthy once every route is sorted and every screen bucketed.
47
+
48
+ ### 2. Scaffold the shell
49
+
50
+ `create-expo-app`, then mirror the web routes in Expo Router — Next's tree maps almost 1:1 (note `[id]/page.tsx` → `[id].tsx`, and routes may live in `src/app/`). Empty screens, one per route.
51
+
52
+ ### 3. Shell it in DOM components — the day-one milestone
53
+
54
+ Bring every screen over as a DOM component (`'use dom'`, per the `use-dom` skill) rendered by its native route, so the whole app runs on a phone before anything is nativized. Expect per-screen edits — unwrapping Server Components, swapping framework imports (`next/link`), carrying the styling over — all covered in false-friends. Then verify by running (below); this is shippable to TestFlight as-is.
55
+
56
+ ### 4. Strangle screens to native — by value
57
+
58
+ Walk `migration-progress.md` top-down. For each screen, *redesign* it native — don't port the web layout. Reach for **`@expo/ui` first** (real SwiftUI/Compose — buttons, lists, sheets, pickers, sliders; [`./references/native-patterns.md`](./references/native-patterns.md) maps which web pattern becomes which native component), then platform navigation (`building-native-ui` — NativeTabs, large titles) and mobile UX (swipe, haptics, momentum/inverted scroll); RN primitives only for custom layouts. Consult [`./references/false-friends.md`](./references/false-friends.md) for each idiom. `@expo/ui` and DOM components both run in **Expo Go** (SDK 56+) — a dev build (the `expo-dev-client` skill) is only needed for *custom* native modules. Verify *content and behavior* against the running web original (the look should become more native), then check it off. One screen per pass, app shippable throughout. It's a loop over a durable worklist, so it can run unattended — hand it to a goal loop ([`./references/run-as-goal.md`](./references/run-as-goal.md)).
59
+
60
+ ### 5. Wire data, auth, and storage
61
+
62
+ The web data layer doesn't survive the move — relative fetches, cookie sessions, `localStorage`, and env vars all change (swaps in false-friends). Use `native-data-fetching` for requests and caching; add `expo-api-routes` if the backend moved to EAS Hosting.
63
+
64
+ ### 6. Ship
65
+
66
+ `expo-deployment` for the store builds (App Store / Play / TestFlight), EAS Update for OTA pushes after.
67
+
68
+ ## Verify by running, not compiling
69
+
70
+ A green `expo export` proves a screen *bundles*, not that it *renders* — a screen can build and still render blank or mis-render. So after the shell and after every nativized screen, compare the two **running** apps for the same route:
71
+
72
+ - **Web original** — capture it with **`agent-browser`** (vercel-labs CLI): `open` the route, `snapshot --json` the accessibility tree, `screenshot`.
73
+ - **Native** — drive the simulator with **`argent`**: `describe` / `debugger-component-tree` for structure, `flow` to replay the check each pass.
74
+
75
+ Pass on parity of **content and behavior** — not pixels: a nativized screen should look *more* native than the web, never identical (the DOM-shell stage is the exception — there it *is* the web UI, so it should match). Feel is part of native and can't be screenshotted — for screens with transitions or gestures, capture a short recording, not just a still (see `native-patterns.md` → Feel). This loop is **opinionated about its tooling**: if `agent-browser` or `argent` isn't installed, ask the user and install it before proceeding — don't fall back to manual screenshots. Full recipe and setup in [`./references/verify-on-device.md`](./references/verify-on-device.md).
76
+
77
+ ## References
78
+
79
+ - [`./references/false-friends.md`](./references/false-friends.md) — web idiom → native equivalent + the gotcha for each. The lookup for steps 3–5, and for any web dev unlearning idioms.
80
+ - [`./references/native-patterns.md`](./references/native-patterns.md) — web UX *pattern* → native redesign (`@expo/ui`-first). The step-4 redesign playbook so screens feel OS-native, not reskinned.
81
+ - [`./references/verify-on-device.md`](./references/verify-on-device.md) — the two-agent parity recipe: drive the web app (browser agent) and the native app (argent), open the same route, compare.
82
+ - [`./references/run-as-goal.md`](./references/run-as-goal.md) — a ready-shaped, migration-specific goal objective for driving step 4 unattended (re-reads this skill each iteration).
83
+ - [Expo — From Web to Native with React](https://expo.dev/blog/from-web-to-native-with-react) — the canonical guide this skill operationalizes.
@@ -0,0 +1,119 @@
1
+ # False Friends: web idioms → native
2
+
3
+ Disclosed reference for [`web-to-native`](../SKILL.md). A *false friend* is a web idiom that looks portable but isn't — it compiles in your head, then breaks (or silently no-ops) on native. Each row is `web idiom → native equivalent → the gotcha`. Reach for this in steps 3–5 of a migration, and whenever you're learning native after the web.
4
+
5
+ This is the single source of truth for the mapping; the SKILL.md steps name a few high-traffic swaps but defer the full list here.
6
+
7
+ ## Elements & text
8
+
9
+ | Web | Native | Gotcha |
10
+ |---|---|---|
11
+ | `<div>`, `<section>`, `<span>` | `<View>` | `View` is the only generic container; no semantic element variants. |
12
+ | `<p>`, `<h1>`, raw text in JSX | `<Text>` | **All** text must sit inside `<Text>`. Bare strings in a `View` throw. |
13
+ | `<img src>` | `<Image>` / `expo-image` | `expo-image` adds caching, blurhash, transitions. Remote images need an explicit `width`/`height` or a flex parent. |
14
+ | `<button>`, `<a>` | `<Pressable>` (or `TouchableOpacity`) | No default styling, no hover. Wrap label text in `<Text>`. |
15
+ | `<input>` | `<TextInput>` | Controlled via `value` + `onChangeText` (not `onChange`/`e.target.value`). |
16
+ | `<ul>/<li>` rendered with `.map()` | `<FlatList>` / `<FlashList>` | `.map()` over a long list mounts every row at once → jank. Use a virtualized list with `data` + `renderItem`. |
17
+
18
+ ## Events & interaction
19
+
20
+ | Web | Native | Gotcha |
21
+ |---|---|---|
22
+ | `onClick` | `onPress` | Also `onLongPress`, `onPressIn/Out`. There is no click. |
23
+ | `onChange={e => e.target.value}` | `onChangeText={text => ...}` | The handler receives the string directly, not an event. |
24
+ | `onSubmit` (form) | `onPress` / `onSubmitEditing` | No `<form>` element and no submit event; wire the button/keyboard return key. |
25
+ | `:hover`, `:focus` | press/focus state | No hover on touch. Track state and style from it, or use `Pressable`'s state callback. |
26
+ | `e.preventDefault()` | — | No default actions to prevent; remove it. |
27
+
28
+ ## Styling & layout
29
+
30
+ | Web | Native | Gotcha |
31
+ |---|---|---|
32
+ | `className` / CSS files | `StyleSheet.create` or NativeWind | Plain RN has no className. For Tailwind muscle memory use NativeWind (`expo-tailwind-setup`). |
33
+ | CSS cascade & inheritance | none | Styles don't inherit (except a few `Text` props like `color`/`fontSize` to nested `Text`). Style each node. |
34
+ | `display: flex` opt-in, default `row` | flex always on, default **`column`** | Biggest layout surprise: flex is the only layout model and the main axis is vertical by default. |
35
+ | `px`, `rem`, `%` | unitless numbers (dp) | `padding: 16` = density-independent pixels. `%` works in some props; no `rem`/`em`/`vh`. |
36
+ | `@media` queries | `useWindowDimensions()` / `Platform` | No media queries. Branch on dimensions or platform at runtime. |
37
+ | `position: fixed` | `position: absolute` + safe area | No `fixed`. Pin with `absolute` and respect insets (`react-native-safe-area-context`). |
38
+ | `z-index` | `zIndex` (+ `elevation` on Android) | Works mostly, but Android shadow/stacking also needs `elevation`. |
39
+ | CSS transitions / `@keyframes` | `Animated` / Reanimated | No CSS animation. Reanimated is the standard; gestures via `react-native-gesture-handler`. |
40
+ | `gap`, flexbox | `gap`, flexbox | These largely transfer — flexbox is the one big win for web devs. |
41
+
42
+ ## Navigation & URLs
43
+
44
+ | Web | Native | Gotcha |
45
+ |---|---|---|
46
+ | React Router / Next.js routes | Expo Router (file-based) | File-based like Next App Router; `react-router` concepts map but the API differs. |
47
+ | `<a href>` / `<Link>` | `expo-router` `<Link href>` | Works in DOM components too. |
48
+ | `useNavigate()` / `router.push` | `useRouter()` from `expo-router` | `router.push/replace/back`. |
49
+ | `useParams` / `useSearchParams` | `useLocalSearchParams()` | Note: doesn't work *inside* a DOM component — read in the native parent, pass as props (see `use-dom`). |
50
+ | `window.location` | `usePathname()` / router | No `location` object. |
51
+ | Deep links / `myapp://` | URL scheme + universal links | Configure `scheme` in app config; native gives you real deep linking and (with AASA) app links — see `add-app-clip` for the AASA file. |
52
+
53
+ ## React architecture & data (Next.js / SSR apps)
54
+
55
+ | Web | Native | Gotcha |
56
+ |---|---|---|
57
+ | Async Server Component (`async function Page()`) | client component + data fetch | No RSC on native (Expo's is experimental and different). Split into a client component that fetches via the API + a presentational child *before* porting. |
58
+ | Server actions (`'use server'`) | API route + `fetch` | No server actions. Expose an endpoint and call it. |
59
+ | `cookies()` / `headers()` (server) | token in `expo-secure-store` | Server-only. Auth moves to a bearer token sent as a header. |
60
+ | ORM / DB client in a page (Drizzle, Prisma) | server only — call over HTTP | The device never talks to the DB. Keep the backend deployed, or move routes to EAS Hosting (`expo-api-routes`); the app fetches. |
61
+ | `next/navigation` (`notFound`, `redirect`) | `expo-router` | `redirect()` → `router.replace`; `notFound()` → a native `+not-found` route. |
62
+ | `_layout` as a DOM component | always native | Layout routes can't be DOM components — they *are* the native shell. Rewrite web-only layout logic (theme scripts, providers) with native APIs. |
63
+
64
+ ## Storage, state & sessions
65
+
66
+ | Web | Native | Gotcha |
67
+ |---|---|---|
68
+ | `localStorage` / `sessionStorage` | `expo-sqlite` (`globalThis.localStorage`) | `import 'expo-sqlite/localStorage/install';` polyfills the global `localStorage`, so existing code works as-is (or `expo-sqlite/kv-store`). **No `sessionStorage` equivalent** — native has no session concept. |
69
+ | Cookies / `document.cookie` | `expo-secure-store` + headers | No cookie jar by default. Store tokens in SecureStore; send as auth headers. |
70
+ | Auth via session cookie | token in SecureStore | Redesign auth around bearer tokens, not browser sessions. |
71
+ | In-memory React state | same | `useState`/`useReducer`/`useContext` transfer unchanged. |
72
+
73
+ ## Browser & platform APIs
74
+
75
+ | Web | Native | Gotcha |
76
+ |---|---|---|
77
+ | `window`, `document` | none | Don't exist. Guard web-only libs, or keep them in a DOM component (`use-dom`). |
78
+ | `window.matchMedia('(prefers-color-scheme: dark)')` | `useColorScheme()` | Hook from `react-native`, reactive to the system theme. Web theme bootstrap scripts in the layout don't run. |
79
+ | `window.innerWidth/Height` | `useWindowDimensions()` | Reactive hook; updates on rotation. |
80
+ | `navigator.*`, Web APIs | Expo SDK modules | e.g. camera → `expo-camera`, geolocation → `expo-location`, clipboard → `expo-clipboard`. |
81
+ | `alert()` / `confirm()` / `prompt()` | `alert()` works; `Alert.alert(...)` for the rest | RN provides a global `alert()`; `confirm()` / `prompt()` don't exist — use `Alert.alert` with a button array. |
82
+ | `process.env.X` | `process.env.EXPO_PUBLIC_X` | Only `EXPO_PUBLIC_`-prefixed vars are inlined into the client bundle. |
83
+ | `console.log` | `console.log` | Works — shows in the dev tools/terminal. |
84
+ | `dangerouslySetInnerHTML` | — | No DOM to inject into. Render data, or use a DOM component / WebView. |
85
+ | inline SVG | `react-native-svg` | No native `<svg>`; the library mirrors the element API. |
86
+
87
+ ## Networking
88
+
89
+ | Web | Native | Gotcha |
90
+ |---|---|---|
91
+ | `fetch('/api/x')` (relative) | absolute URL | Native has no origin — relative paths fail. Use a configured base URL (`EXPO_PUBLIC_API_URL`). |
92
+ | CORS | n/a | No browser CORS, but you still need a reachable absolute host. |
93
+ | `fetch`, React Query, SWR | same | The libraries themselves work on native — see `native-data-fetching`. |
94
+ | Next.js API routes | Expo Router API routes | Move server endpoints to Expo API routes on EAS Hosting — see `expo-api-routes`. |
95
+ | Streaming responses (SSE, AI SDK `useChat`) | `expo/fetch` with `textStreaming` | RN's built-in `fetch` can't read a streaming response body. Use `expo/fetch` (streams, and works with the Vercel AI SDK) or an XHR-based polyfill. |
96
+
97
+ ## Third-party services & SDKs
98
+
99
+ Browser SDKs don't run on native — each needs a native equivalent. The canonical, version-matched integrations live in the `expo-examples` skill (the `expo/examples` repo); reach for those instead of wiring from scratch.
100
+
101
+ | Web service | Native | Gotcha |
102
+ |---|---|---|
103
+ | **Stripe.js — digital goods / subscriptions** | store **In-App Purchase** via **RevenueCat** (`react-native-purchases`) | **Policy, not just an SDK swap.** Apple & Google *require* IAP for in-app digital goods and take ~15–30%; shipping Stripe for them gets the app rejected. Decide at assess time — it can change the business model. |
104
+ | **Stripe.js — physical goods / services** | `@stripe/stripe-react-native` (PaymentSheet, Apple/Google Pay) | Stripe's RN SDK is allowed for physical goods; see `expo-examples` `with-stripe`. |
105
+ | Google Maps JS | `react-native-maps` | A native map view, not an embedded iframe. |
106
+ | Web Push | `expo-notifications` (APNs / FCM) | Different delivery + permission model. |
107
+ | OAuth redirect flow | `expo-auth-session` (deep-link OAuth), or a native auth SDK (Clerk, Supabase…) | No browser redirect — an app deep link completes the flow. |
108
+ | GA / Segment.js analytics | native SDK (`posthog-react-native`, Segment RN) | The web JS snippet won't load; swap for the native SDK. |
109
+ | `<input type=file>` / `getUserMedia` | `expo-image-picker` / `expo-camera` / `expo-document-picker` | Native pickers + runtime permissions. |
110
+
111
+ ## Scrolling, keyboard & safe area
112
+
113
+ | Web | Native | Gotcha |
114
+ |---|---|---|
115
+ | Body scrolls by default | `<ScrollView>` / `<FlatList>` | Nothing scrolls unless you make it. Wrap overflowing content explicitly. |
116
+ | `overflow: scroll` | `<ScrollView>` | Don't nest a `ScrollView` inside a `FlatList` of the same axis. |
117
+ | Keyboard overlaps inputs | `KeyboardAvoidingView` | The keyboard covers inputs by default; wrap forms to push content up. |
118
+ | Notch / status bar | `react-native-safe-area-context` | Content flows under the notch/home indicator unless you apply safe-area insets. |
119
+ | `:focus` ring, tab order | manual | No automatic focus management; wire `ref`/`focus()` and `returnKeyType`. |
@@ -0,0 +1,39 @@
1
+ # Native patterns: redesigning web UX for native
2
+
3
+ Disclosed reference for [`web-to-native`](../SKILL.md), step 4. `false-friends.md` translates *idioms* (`div` → `View`); this translates *UX patterns* — a web interaction into its native equivalent. Step 4 isn't a port, it's this redesign.
4
+
5
+ **Reach for `@expo/ui` first.** It renders real SwiftUI (iOS) and Jetpack Compose (Android), so its components look and feel *exactly* like the OS — the difference between "native-ish RN" and "indistinguishable from an app Apple/Google shipped." See the `expo-ui` skill. Drop to styled RN primitives only for what `@expo/ui` doesn't cover: custom layouts (chat bubbles, bespoke cards) and **large data lists** (`@expo/ui` `List` is a JS-thread node per item — use `FlashList`/`FlatList` for feeds). `@expo/ui` runs in **Expo Go** (SDK 56+) — no dev build needed; reach for a dev build (the `expo-dev-client` skill) only for *custom* native modules.
6
+
7
+ | Web pattern | Native redesign — reach for first | Why |
8
+ |---|---|---|
9
+ | Top tab bar / nav links | **NativeTabs** — bottom, liquid glass on iOS 26 (`building-native-ui`) | Thumb-reachable, OS-native bar |
10
+ | Page header / breadcrumb | **large-title** Stack header + header **search field** (`building-native-ui`) | The native screen frame |
11
+ | In-page tabs / toggle group | **SegmentedControl** — `@expo/ui` (`community/segmented-control`) | Native segmented switch |
12
+ | Modal / dialog | **BottomSheet** — `@expo/ui` | Sheets *are* the native modal |
13
+ | `<select>` / dropdown | **Picker**, or long-press **MenuView** — `@expo/ui` (`community/menu`) | Native wheel / menu, no popover |
14
+ | Accordion / "show more" | **Collapsible** — `@expo/ui` | Native disclosure |
15
+ | Settings / short list | **List** + **FieldGroup** rows (Switch / Picker / TextInput) — `@expo/ui` | The Settings-app look |
16
+ | Data feed / table / long list | **FlashList** / `FlatList`, virtualized + momentum | Tables don't exist on mobile; `@expo/ui` `List` isn't for big data |
17
+ | Checkbox / toggle | **Switch** (on/off) or **Checkbox** (multi-select) — `@expo/ui` | Native control, not a styled box |
18
+ | Date / time input | **DateTimePicker** — `@expo/ui` (`community/datetime-picker`) | Native wheel / calendar |
19
+ | Range slider | **Slider** — `@expo/ui` | |
20
+ | Onboarding / carousel / swipe pages | **PagerView** — `@expo/ui` (`community/pager-view`) | Native paging, not a scroll strip |
21
+ | Refresh button / auto-poll | pull-to-refresh (`RefreshControl`) | The native refresh gesture |
22
+ | Hover menu / tooltip | long-press **MenuView** context menu — `@expo/ui` (`community/menu`) | No hover on touch |
23
+ | Toast / snackbar | native banner + **haptic** (`expo-haptics`) | |
24
+ | Buttons | `@expo/ui` **Button**; `Pressable` for custom | Native press + haptics |
25
+ | Multi-column layout | single column + tabs / stack | One thing at a time on a phone |
26
+
27
+ **The test:** if a screenshot of the native screen could pass for the web version, you reskinned it. Redesign until it could pass for a screen the OS shipped.
28
+
29
+ ## Feel — beyond the components
30
+
31
+ The table gets the right *components*; "native" also lives in *motion and touch* — and a web port arrives with almost none, so you must add it. The tooling is all in `building-native-ui`; reach for it, don't hand-roll:
32
+
33
+ - **Transitions for free** — use Expo Router's native-stack so push/pop, modals, and sheets animate with real platform physics; shared-element zoom via `building-native-ui` `zoom-transitions.md`.
34
+ - **Motion** — Reanimated (`withSpring`/`withTiming`; `entering`/`exiting` for list items) + `react-native-gesture-handler` for swipes/drags → `building-native-ui` `animations.md`.
35
+ - **Touch** — `expo-haptics` on commits, selection changes, and pull-to-refresh — choreography, not just a toast buzz.
36
+ - **Native rhythm** — large-title collapse on scroll, momentum / inverted scroll, a keyboard that pushes content (`KeyboardAvoidingView`).
37
+ - **Respect reduced motion** — gate non-essential animation on Reanimated's `useReducedMotion()`.
38
+
39
+ **Feel can't be screenshotted.** A janky transition or wrong easing passes a still-image parity check and still betrays the app — for screens with motion, verify with a short recording (iOS `xcrun simctl io booted recordVideo feel.mov`; Android `adb shell screenrecord`; or a device-agent flow), not just a screenshot.