[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D2033PWD8EKPAS9KKEWQ14":3,"skill-same:01M6D2033PWD8EKPAS9KKEWQ14":166},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":62,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6D2033PWD8EKPAS9KKEWQ14","mobile-react-native",null,"React Native with Expo: project setup, Expo Router or React Navigation, styling, lists with FlashList, images, data and state, secure storage, animations with Reanimated and Gesture Handler, native modules, the New Architecture, performance on the JS thread, testing, and EAS builds and updates. Read when the project uses React Native or Expo.","enowdev\u002Fenowxcli","enowdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179420349?v=4","01M6D1MVX2KC0X3Z9NESE7P22K","Enow Dev.","01M6D1MW1FMZGBDKWAJY4GQX81",67,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fmobile-react-native\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"mobile react native","react","mobile","react native","router","project","expo","images","navigation","project setup","modules","styling","testing","read","data","state","secure","architecture","storage","performance","2026-11-10 10:12:30",false,"---\nname: mobile-react-native\ndescription: \"React Native with Expo: project setup, Expo Router or React Navigation, styling, lists with FlashList, images, data and state, secure storage, animations with Reanimated and Gesture Handler, native modules, the New Architecture, performance on the JS thread, testing, and EAS builds and updates. Read when the project uses React Native or Expo.\"\n---\n\n# React Native with Expo\n\nThe naive React Native app: native folders edited by hand and lost at the\nnext prebuild, a `ScrollView` mapping 500 rows, animations driven by\n`setState` that stutter while data loads, a `useEffect` fetch in every\nscreen, the token in AsyncStorage, performance judged in a debug build, and\nan over-the-air update carrying JavaScript that needs a native module the\ninstalled binary lacks. This is the current Expo way to build, measure and\nship. Conventions in `mobile-ux`, sync in `mobile-data`, stores in\n`mobile-release`.\n\n## 1. Project setup\n\n- Expo by default (the React Native docs recommend a framework):\n  `npx create-expo-app@latest`. A development build (`expo-dev-client`) as\n  soon as any library has native code; Expo Go only for quick prototypes.\n- Continuous Native Generation: `ios\u002F` and `android\u002F` come from\n  `npx expo prebuild` and are ignored by git; native settings come from the\n  app config and config plugins. A project that commits its native folders\n  owns them: edit them there, never `prebuild --clean` over them.\n- The New Architecture (Fabric, TurboModules, bridgeless) is the default\n  since React Native 0.76 and the only one from 0.82; Expo SDK 54 was the\n  last SDK with the legacy one. Check libraries on reactnative.directory.\n- `npx expo install \u003Cpkg>` picks the version matching the SDK;\n  `npx expo install --check` and `npx expo-doctor` find mismatches.\n\n```ts\n\u002F\u002F app.config.ts\nimport type { ConfigContext, ExpoConfig } from \"expo\u002Fconfig\";\n\nconst variant = process.env.APP_VARIANT ?? \"production\";\nconst id = variant === \"production\" ? \"com.acme.app\" : `com.acme.app.${variant}`;\n\nexport default ({ config }: ConfigContext): ExpoConfig => ({\n  ...config,\n  name: variant === \"production\" ? \"Acme\" : `Acme (${variant})`,\n  slug: \"acme\",\n  scheme: \"acme\",\n  userInterfaceStyle: \"automatic\", \u002F\u002F without it the app stays light\n  ios: { bundleIdentifier: id },\n  android: { package: id },\n  runtimeVersion: { policy: \"fingerprint\" },\n  plugins: [\"expo-router\", [\"expo-camera\", { cameraPermission: \"Allow Acme to scan receipts.\" }]],\n  experiments: { typedRoutes: true },\n});\n```\n\n- `EXPO_PUBLIC_*` values are inlined into the bundle: public. Read them\n  statically (`process.env.EXPO_PUBLIC_API_URL`, never `process.env[name]`).\n  Secrets stay on the server; build values live in EAS environment\n  variables (`eas env:create`, per environment).\n- `eas.json` profiles: `development` (`developmentClient`, internal\n  distribution), `preview` (internal, own channel), `production` (channel\n  `production`, `autoIncrement`); `appVersionSource: \"remote\"` under `cli`.\n\n## 2. Navigation\n\nExpo Router: files are routes, each deep-linkable, typed with\n`experiments.typedRoutes`. React Navigation (native stack, bottom tabs)\nwhere the project already uses it; Expo Router is built on it.\n\n```\napp\u002F_layout.tsx                root Stack, providers, the auth guard\napp\u002Fsign-in.tsx\napp\u002Fcompose.tsx                presentation: \"modal\"\napp\u002F(tabs)\u002F_layout.tsx         \u003CTabs> with 3 to 5 screens\napp\u002F(tabs)\u002Forders\u002F_layout.tsx  a Stack inside the tab\napp\u002F(tabs)\u002Forders\u002F[id].tsx     \u002Forders\u002F42 and acme:\u002F\u002Forders\u002F42\napp\u002F+not-found.tsx\n```\n\n```tsx\nexport default function RootLayout() {\n  const { session } = useSession();\n  return (\n    \u003CStack>\n      \u003CStack.Protected guard={!!session}>\n        \u003CStack.Screen name=\"(tabs)\" options={{ headerShown: false }} \u002F>\n        \u003CStack.Screen name=\"compose\" options={{ presentation: \"modal\" }} \u002F>\n      \u003C\u002FStack.Protected>\n      \u003CStack.Protected guard={!session}>\n        \u003CStack.Screen name=\"sign-in\" options={{ headerShown: false }} \u002F>\n      \u003C\u002FStack.Protected>\n    \u003C\u002FStack>\n  );\n}\n```\n\n- ``\u003CLink href={`\u002Forders\u002F${id}`}>`` or `router.push(...)`; params with\n  `useLocalSearchParams\u003C{ id: string }>()`; `router.replace` after sign-in\n  and sign-out, so back skips the form. Sheets: `presentation: \"formSheet\"`\n  with `sheetAllowedDetents`. Native headers and tabs, not JavaScript ones.\n\n## 3. Styling\n\n- `StyleSheet.create` with tokens from one module, or the project's library\n  (NativeWind, Unistyles, Tamagui); `Platform.select` for real differences.\n- `useWindowDimensions()`, never `Dimensions.get` at module scope; safe\n  areas from react-native-safe-area-context (the built-in `SafeAreaView` is\n  deprecated). `Pressable` with `android_ripple`, `hitSlop` to reach 48dp.\n\n## 4. Lists\n\n```tsx\n\u003CFlashList\n  data={orders}\n  renderItem={renderOrder} \u002F\u002F stable, defined outside the render or memoised\n  keyExtractor={(o) => o.id}\n  getItemType={(o) => o.kind}\n  onEndReached={fetchNextPage}\n  onEndReachedThreshold={0.5}\n\u002F>\n```\n\n- FlashList v2 (New Architecture) measures rows itself; on v1, set\n  `estimatedItemSize` to the typical row height.\n- Memoised rows with stable callbacks. FlashList recycles rows: local state\n  leaks from one item to the next unless reset when the item changes.\n- `FlatList` where FlashList is absent (`getItemLayout` for fixed heights).\n  Never a `ScrollView` with `.map` for more than a screenful.\n\n## 5. Images\n\n```tsx\n\u003CImage source={{ uri: p.imageUrl }} placeholder={{ blurhash: p.blurhash }}\n  contentFit=\"cover\" transition={150} cachePolicy=\"memory-disk\"\n  recyclingKey={p.id} style={{ width: 64, height: 64 }} accessibilityLabel={p.name} \u002F>\n```\n\nexpo-image, with the size shown requested from the server or CDN (a 64pt\nthumbnail needs 192px at 3x, not the 4000px original); `Image.prefetch`\nfor the next screen; `recyclingKey` stops a recycled row flashing the\nprevious image.\n\n## 6. Data, state and storage\n\nServer data through TanStack Query, never copied into a global store. Tell\nit about focus and connectivity once:\n\n```ts\nonlineManager.setEventListener((setOnline) =>\n  NetInfo.addEventListener((state) => setOnline(!!state.isConnected)),\n);\nAppState.addEventListener(\"change\", (s) => focusManager.setFocused(s === \"active\"));\n```\n\nZustand for small client state, read through selectors (`useCart((s) => s.count)`).\n\n| Store | For |\n|---|---|\n| expo-secure-store | Tokens and small secrets (Keychain, Keystore); values up to 2048 bytes |\n| react-native-mmkv | Fast synchronous key-value: settings, flags, a query cache |\n| expo-sqlite (with Drizzle) or op-sqlite | Relational and offline data (`mobile-data`) |\n| AsyncStorage | Legacy projects only; unencrypted and slow |\n\n```ts\nawait SecureStore.setItemAsync(\"refreshToken\", token, {\n  keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY,\n});\nawait SecureStore.deleteItemAsync(\"refreshToken\"); \u002F\u002F on sign-out\n```\n\n## 7. Animation and gestures\n\nReanimated runs worklets on the UI thread, so a busy JavaScript thread drops\nno frames; Gesture Handler (inside `GestureHandlerRootView`) is native.\n\n```tsx\nconst x = useSharedValue(0);\nconst style = useAnimatedStyle(() => ({ transform: [{ translateX: x.value }] }));\nconst pan = Gesture.Pan()\n  .onChange((e) => { x.value += e.changeX; })\n  .onFinalize(() => { x.value = withSpring(0); });\n\u002F\u002F \u003CGestureDetector gesture={pan}>\u003CAnimated.View style={[styles.card, style]} \u002F>\u003C\u002FGestureDetector>\n```\n\n- Reanimated 4 needs the New Architecture and adds CSS-like transitions;\n  its worklets live in `react-native-worklets`. Legacy apps stay on 3.\n- Layout animations (`entering={FadeIn.duration(200)}`, `LinearTransition`);\n  reduced motion with `ReduceMotion.System` (`motion-stacks`). Never\n  `setState` per frame or `Animated` with `useNativeDriver: false`.\n\n## 8. Native code\n\n- An existing library first (Expo SDK, then maintained community modules).\n  Your own through the Expo Modules API: `npx create-expo-module@latest\n  --local` creates `modules\u002F\u003Cname>` with Swift and Kotlin sides.\n\n```swift\nimport ExpoModulesCore\n\npublic class DeviceStorageModule: Module {\n  public func definition() -> ModuleDefinition {\n    Name(\"DeviceStorage\")\n    AsyncFunction(\"freeBytes\") { () -> Int64 in\n      let v = try URL(fileURLWithPath: NSHomeDirectory())\n        .resourceValues(forKeys: [.volumeAvailableCapacityForImportantUsageKey])\n      return v.volumeAvailableCapacityForImportantUsage ?? 0\n    }\n  }\n}\n```\n\n  JavaScript loads it with `requireNativeModule(\"DeviceStorage\")` from\n  `expo-modules-core`. Disk space is a required-reason API: declare it in\n  the privacy manifest (`mobile-ios`).\n- Native configuration (Info.plist keys, manifest entries, Gradle\n  settings) through a config plugin (`withInfoPlist`, `withAndroidManifest`\n  from `expo\u002Fconfig-plugins`), not a hand-edited folder.\n\n## 9. Performance\n\n- Measure release builds only (`npx expo run:ios --configuration Release`,\n  `npx expo run:android --variant release`); debug builds are several times\n  slower. Hermes compiles bytecode at build time.\n- Re-renders: with the React Compiler on (`experiments.reactCompiler`),\n  manual memoisation is mostly unnecessary; without it, `memo` on rows and\n  heavy children, `useCallback` for their callbacks, narrow selectors, and\n  contexts split by how often they change.\n- The JavaScript thread runs UI logic only: large JSON, crypto and image\n  work move to native code or the server.\n- Startup: keep the splash (`SplashScreen.preventAutoHideAsync()`) until\n  fonts and cached data are ready, never until a network call returns.\n- Tools: React Native DevTools (`j` in the Metro terminal) with the React\n  profiler; the Perf Monitor (JS and UI frame rates); Expo Atlas for the\n  bundle; Instruments and Android Studio natively (`mobile-performance`).\n\n## 10. Testing\n\n```tsx\ntest(\"adds an item to the cart\", async () => {\n  const user = userEvent.setup();\n  render(\u003CProductScreen product={sample} \u002F>);\n  await user.press(screen.getByRole(\"button\", { name: \"Add to cart\" }));\n  expect(await screen.findByText(\"1 item\")).toBeOnTheScreen();\n});\n```\n\n- Jest with `jest-expo` and React Native Testing Library; queries by role\n  and text; the network mocked at the fetch layer (MSW), not in hooks.\n- End-to-end with Maestro (YAML, any build) or Detox (grey-box, waits for\n  the app to idle); `mobile-testing`.\n\n## 11. Builds and updates\n\n```bash\neas build --profile development --platform ios\neas build --profile production --platform all\neas submit --platform ios --latest      # only when asked\neas update --channel production --message \"Fix rounding in cart totals\"\n```\n\n- EAS Update ships JavaScript and assets only. A new native library, a\n  permission, an SDK upgrade or a config plugin change needs a new binary.\n  The `fingerprint` runtime version changes whenever native code does, so\n  an update never reaches a binary it cannot run on.\n- Updates download on launch and apply on the next one; roll back by\n  republishing the previous update (`eas update:republish`); `mobile-release`.\n\n## Check it\n\n- `npx expo-doctor`, `npx tsc --noEmit`, `npx expo lint`, `npx jest`.\n- `npx expo export --platform all` bundles both platforms without a device.\n- A release build with the changed flow walked, the Perf Monitor steady\n  while scrolling; Maestro flows if present.\n\n## Avoid\n\nHand edits to generated native folders; Expo Go for an app with native\nlibraries; secrets in `EXPO_PUBLIC_` variables; `ScrollView` lists; row\nrenderers without memoisation; server data in Redux or Zustand; tokens in\nAsyncStorage; JavaScript-driven animation; performance judged in debug; an\nover-the-air update carrying a native change; libraries without New\nArchitecture support.\n","# React Native with Expo\n\nThe naive React Native app: native folders edited by hand and lost at the\nnext prebuild, a `ScrollView` mapping 500 rows, animations driven by\n`setState` that stutter while data loads, a `useEffect` fetch in every\nscreen, the token in AsyncStorage, performance judged in a debug build, and\nan over-the-air update carrying JavaScript that needs a native module the\ninstalled binary lacks. This is the current Expo way to build, measure and\nship. Conventions in `mobile-ux`, sync in `mobile-data`, stores in\n`mobile-release`.\n\n## 1. Project setup\n\n- Expo by default (the React Native docs recommend a framework):\n  `npx create-expo-app@latest`. A development build (`expo-dev-client`) as\n  soon as any library has native code; Expo Go only for quick prototypes.\n- Continuous Native Generation: `ios\u002F` and `android\u002F` come from\n  `npx expo prebuild` and are ignored by git; native settings come from the\n  app config and config plugins. A project that commits its native folders\n  owns them: edit them there, never `prebuild --clean` over them.\n- The New Architecture (Fabric, TurboModules, bridgeless) is the default\n  since React Native 0.76 and the only one from 0.82; Expo SDK 54 was the\n  last SDK with the legacy one. Check libraries on reactnative.directory.\n- `npx expo install \u003Cpkg>` picks the version matching the SDK;\n  `npx expo install --check` and `npx expo-doctor` find mismatches.\n\n```ts\n\u002F\u002F app.config.ts\nimport type { ConfigContext, ExpoConfig } from \"expo\u002Fconfig\";\n\nconst variant = process.env.APP_VARIANT ?? \"production\";\nconst id = variant === \"production\" ? \"com.acme.app\" : `com.acme.app.${variant}`;\n\nexport default ({ config }: ConfigContext): ExpoConfig => ({\n  ...config,\n  name: variant === \"production\" ? \"Acme\" : `Acme (${variant})`,\n  slug: \"acme\",\n  scheme: \"acme\",\n  userInterfaceStyle: \"automatic\", \u002F\u002F without it the app stays light\n  ios: { bundleIdentifier: id },\n  android: { package: id },\n  runtimeVersion: { policy: \"fingerprint\" },\n  plugins: [\"expo-router\", [\"expo-camera\", { cameraPermission: \"Allow Acme to scan receipts.\" }]],\n  experiments: { typedRoutes: true },\n});\n```\n\n- `EXPO_PUBLIC_*` values are inlined into the bundle: public. Read them\n  statically (`process.env.EXPO_PUBLIC_API_URL`, never `process.env[name]`).\n  Secrets stay on the server; build values live in EAS environment\n  variables (`eas env:create`, per environment).\n- `eas.json` profiles: `development` (`developmentClient`, internal\n  distribution), `preview` (internal, own channel), `production` (channel\n  `production`, `autoIncrement`); `appVersionSource: \"remote\"` under `cli`.\n\n## 2. Navigation\n\nExpo Router: files are routes, each deep-linkable, typed with\n`experiments.typedRoutes`. React Navigation (native stack, bottom tabs)\nwhere the project already uses it; Expo Router is built on it.\n\n```\napp\u002F_layout.tsx                root Stack, providers, the auth guard\napp\u002Fsign-in.tsx\napp\u002Fcompose.tsx                presentation: \"modal\"\napp\u002F(tabs)\u002F_layout.tsx         \u003CTabs> with 3 to 5 screens\napp\u002F(tabs)\u002Forders\u002F_layout.tsx  a Stack inside the tab\napp\u002F(tabs)\u002Forders\u002F[id].tsx     \u002Forders\u002F42 and acme:\u002F\u002Forders\u002F42\napp\u002F+not-found.tsx\n```\n\n```tsx\nexport default function RootLayout() {\n  const { session } = useSession();\n  return (\n    \u003CStack>\n      \u003CStack.Protected guard={!!session}>\n        \u003CStack.Screen name=\"(tabs)\" options={{ headerShown: false }} \u002F>\n        \u003CStack.Screen name=\"compose\" options={{ presentation: \"modal\" }} \u002F>\n      \u003C\u002FStack.Protected>\n      \u003CStack.Protected guard={!session}>\n        \u003CStack.Screen name=\"sign-in\" options={{ headerShown: false }} \u002F>\n      \u003C\u002FStack.Protected>\n    \u003C\u002FStack>\n  );\n}\n```\n\n- ``\u003CLink href={`\u002Forders\u002F${id}`}>`` or `router.push(...)`; params with\n  `useLocalSearchParams\u003C{ id: string }>()`; `router.replace` after sign-in\n  and sign-out, so back skips the form. Sheets: `presentation: \"formSheet\"`\n  with `sheetAllowedDetents`. Native headers and tabs, not JavaScript ones.\n\n## 3. Styling\n\n- `StyleSheet.create` with tokens from one module, or the project's library\n  (NativeWind, Unistyles, Tamagui); `Platform.select` for real differences.\n- `useWindowDimensions()`, never `Dimensions.get` at module scope; safe\n  areas from react-native-safe-area-context (the built-in `SafeAreaView` is\n  deprecated). `Pressable` with `android_ripple`, `hitSlop` to reach 48dp.\n\n## 4. Lists\n\n```tsx\n\u003CFlashList\n  data={orders}\n  renderItem={renderOrder} \u002F\u002F stable, defined outside the render or memoised\n  keyExtractor={(o) => o.id}\n  getItemType={(o) => o.kind}\n  onEndReached={fetchNextPage}\n  onEndReachedThreshold={0.5}\n\u002F>\n```\n\n- FlashList v2 (New Architecture) measures rows itself; on v1, set\n  `estimatedItemSize` to the typical row height.\n- Memoised rows with stable callbacks. FlashList recycles rows: local state\n  leaks from one item to the next unless reset when the item changes.\n- `FlatList` where FlashList is absent (`getItemLayout` for fixed heights).\n  Never a `ScrollView` with `.map` for more than a screenful.\n\n## 5. Images\n\n```tsx\n\u003CImage source={{ uri: p.imageUrl }} placeholder={{ blurhash: p.blurhash }}\n  contentFit=\"cover\" transition={150} cachePolicy=\"memory-disk\"\n  recyclingKey={p.id} style={{ width: 64, height: 64 }} accessibilityLabel={p.name} \u002F>\n```\n\nexpo-image, with the size shown requested from the server or CDN (a 64pt\nthumbnail needs 192px at 3x, not the 4000px original); `Image.prefetch`\nfor the next screen; `recyclingKey` stops a recycled row flashing the\nprevious image.\n\n## 6. Data, state and storage\n\nServer data through TanStack Query, never copied into a global store. Tell\nit about focus and connectivity once:\n\n```ts\nonlineManager.setEventListener((setOnline) =>\n  NetInfo.addEventListener((state) => setOnline(!!state.isConnected)),\n);\nAppState.addEventListener(\"change\", (s) => focusManager.setFocused(s === \"active\"));\n```\n\nZustand for small client state, read through selectors (`useCart((s) => s.count)`).\n\n| Store | For |\n|---|---|\n| expo-secure-store | Tokens and small secrets (Keychain, Keystore); values up to 2048 bytes |\n| react-native-mmkv | Fast synchronous key-value: settings, flags, a query cache |\n| expo-sqlite (with Drizzle) or op-sqlite | Relational and offline data (`mobile-data`) |\n| AsyncStorage | Legacy projects only; unencrypted and slow |\n\n```ts\nawait SecureStore.setItemAsync(\"refreshToken\", token, {\n  keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY,\n});\nawait SecureStore.deleteItemAsync(\"refreshToken\"); \u002F\u002F on sign-out\n```\n\n## 7. Animation and gestures\n\nReanimated runs worklets on the UI thread, so a busy JavaScript thread drops\nno frames; Gesture Handler (inside `GestureHandlerRootView`) is native.\n\n```tsx\nconst x = useSharedValue(0);\nconst style = useAnimatedStyle(() => ({ transform: [{ translateX: x.value }] }));\nconst pan = Gesture.Pan()\n  .onChange((e) => { x.value += e.changeX; })\n  .onFinalize(() => { x.value = withSpring(0); });\n\u002F\u002F \u003CGestureDetector gesture={pan}>\u003CAnimated.View style={[styles.card, style]} \u002F>\u003C\u002FGestureDetector>\n```\n\n- Reanimated 4 needs the New Architecture and adds CSS-like transitions;\n  its worklets live in `react-native-worklets`. Legacy apps stay on 3.\n- Layout animations (`entering={FadeIn.duration(200)}`, `LinearTransition`);\n  reduced motion with `ReduceMotion.System` (`motion-stacks`). Never\n  `setState` per frame or `Animated` with `useNativeDriver: false`.\n\n## 8. Native code\n\n- An existing library first (Expo SDK, then maintained community modules).\n  Your own through the Expo Modules API: `npx create-expo-module@latest\n  --local` creates `modules\u002F\u003Cname>` with Swift and Kotlin sides.\n\n```swift\nimport ExpoModulesCore\n\npublic class DeviceStorageModule: Module {\n  public func definition() -> ModuleDefinition {\n    Name(\"DeviceStorage\")\n    AsyncFunction(\"freeBytes\") { () -> Int64 in\n      let v = try URL(fileURLWithPath: NSHomeDirectory())\n        .resourceValues(forKeys: [.volumeAvailableCapacityForImportantUsageKey])\n      return v.volumeAvailableCapacityForImportantUsage ?? 0\n    }\n  }\n}\n```\n\n  JavaScript loads it with `requireNativeModule(\"DeviceStorage\")` from\n  `expo-modules-core`. Disk space is a required-reason API: declare it in\n  the privacy manifest (`mobile-ios`).\n- Native configuration (Info.plist keys, manifest entries, Gradle\n  settings) through a config plugin (`withInfoPlist`, `withAndroidManifest`\n  from `expo\u002Fconfig-plugins`), not a hand-edited folder.\n\n## 9. Performance\n\n- Measure release builds only (`npx expo run:ios --configuration Release`,\n  `npx expo run:android --variant release`); debug builds are several times\n  slower. Hermes compiles bytecode at build time.\n- Re-renders: with the React Compiler on (`experiments.reactCompiler`),\n  manual memoisation is mostly unnecessary; without it, `memo` on rows and\n  heavy children, `useCallback` for their callbacks, narrow selectors, and\n  contexts split by how often they change.\n- The JavaScript thread runs UI logic only: large JSON, crypto and image\n  work move to native code or the server.\n- Startup: keep the splash (`SplashScreen.preventAutoHideAsync()`) until\n  fonts and cached data are ready, never until a network call returns.\n- Tools: React Native DevTools (`j` in the Metro terminal) with the React\n  profiler; the Perf Monitor (JS and UI frame rates); Expo Atlas for the\n  bundle; Instruments and Android Studio natively (`mobile-performance`).\n\n## 10. Testing\n\n```tsx\ntest(\"adds an item to the cart\", async () => {\n  const user = userEvent.setup();\n  render(\u003CProductScreen product={sample} \u002F>);\n  await user.press(screen.getByRole(\"button\", { name: \"Add to cart\" }));\n  expect(await screen.findByText(\"1 item\")).toBeOnTheScreen();\n});\n```\n\n- Jest with `jest-expo` and React Native Testing Library; queries by role\n  and text; the network mocked at the fetch layer (MSW), not in hooks.\n- End-to-end with Maestro (YAML, any build) or Detox (grey-box, waits for\n  the app to idle); `mobile-testing`.\n\n## 11. Builds and updates\n\n```bash\neas build --profile development --platform ios\neas build --profile production --platform all\neas submit --platform ios --latest      # only when asked\neas update --channel production --message \"Fix rounding in cart totals\"\n```\n\n- EAS Update ships JavaScript and assets only. A new native library, a\n  permission, an SDK upgrade or a config plugin change needs a new binary.\n  The `fingerprint` runtime version changes whenever native code does, so\n  an update never reaches a binary it cannot run on.\n- Updates download on launch and apply on the next one; roll back by\n  republishing the previous update (`eas update:republish`); `mobile-release`.\n\n## Check it\n\n- `npx expo-doctor`, `npx tsc --noEmit`, `npx expo lint`, `npx jest`.\n- `npx expo export --platform all` bundles both platforms without a device.\n- A release build with the changed flow walked, the Perf Monitor steady\n  while scrolling; Maestro flows if present.\n\n## Avoid\n\nHand edits to generated native folders; Expo Go for an app with native\nlibraries; secrets in `EXPO_PUBLIC_` variables; `ScrollView` lists; row\nrenderers without memoisation; server data in Redux or Zustand; tokens in\nAsyncStorage; JavaScript-driven animation; performance judged in debug; an\nover-the-air update carrying a native change; libraries without New\nArchitecture support.\n",{"name":5,"description":7},"main","38293fe1b096e6bf3646c7344c38786ed688f464","crates\u002Fenowx-core\u002Fskills\u002Fmobile-react-native",21,"https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli","https:\u002F\u002Fenowx.ai","https:\u002F\u002Fgithub.com\u002Fenowdev","Pretending to be a Developer","2026-10-06 02:05:35",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add enowdev\u002Fenowxcli --skill mobile-react-native",{"tool":72,"command":73},"bunx","bunx skills add enowdev\u002Fenowxcli --skill mobile-react-native",{"tool":75,"command":76},"pnpm","pnpm dlx skills add enowdev\u002Fenowxcli --skill mobile-react-native","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fmobile-react-native\u002FSKILL.md",true,[80,86,90,94,98,102,106,110,114,118,122,128,132,136,140,144,148,154,158,162],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"assets\u002Fchronic_disease_management_plan.tex","ASSET","资产文件",29371,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fchronic_disease_management_plan.tex",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"assets\u002Fgeneral_medical_treatment_plan.tex",23289,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fgeneral_medical_treatment_plan.tex",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"assets\u002Fmedical_treatment_plan.sty",5404,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fmedical_treatment_plan.sty",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"assets\u002Fmental_health_treatment_plan.tex",34509,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fmental_health_treatment_plan.tex",{"path":99,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":100,"sourceHtmlUrl":101},"assets\u002Fone_page_treatment_plan.tex",5377,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fone_page_treatment_plan.tex",{"path":103,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":104,"sourceHtmlUrl":105},"assets\u002Fpain_management_plan.tex",33326,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fpain_management_plan.tex",{"path":107,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":108,"sourceHtmlUrl":109},"assets\u002Fperioperative_care_plan.tex",30005,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fperioperative_care_plan.tex",{"path":111,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":112,"sourceHtmlUrl":113},"assets\u002Fquality_checklist.md",15081,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Fquality_checklist.md",{"path":115,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":116,"sourceHtmlUrl":117},"assets\u002Frehabilitation_treatment_plan.tex",30462,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002Frehabilitation_treatment_plan.tex",{"path":119,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":120,"sourceHtmlUrl":121},"assets\u002FSTYLING_QUICK_REFERENCE.md",3912,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fassets\u002FSTYLING_QUICK_REFERENCE.md",{"path":123,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":126,"sourceHtmlUrl":127},"README.md","REFERENCE","参考文档",16970,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002FREADME.md",{"path":129,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fgoal_setting_frameworks.md",16554,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Freferences\u002Fgoal_setting_frameworks.md",{"path":133,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fintervention_guidelines.md",19024,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Freferences\u002Fintervention_guidelines.md",{"path":137,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fregulatory_compliance.md",17565,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Freferences\u002Fregulatory_compliance.md",{"path":141,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Fspecialty_specific_guidelines.md",26678,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Freferences\u002Fspecialty_specific_guidelines.md",{"path":145,"resourceType":124,"resourceTypeDesc":125,"sizeBytes":146,"sourceHtmlUrl":147},"references\u002Ftreatment_plan_standards.md",16643,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Freferences\u002Ftreatment_plan_standards.md",{"path":149,"resourceType":150,"resourceTypeDesc":151,"sizeBytes":152,"sourceHtmlUrl":153},"scripts\u002Fcheck_completeness.py","SCRIPT","脚本",9771,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fscripts\u002Fcheck_completeness.py",{"path":155,"resourceType":150,"resourceTypeDesc":151,"sizeBytes":156,"sourceHtmlUrl":157},"scripts\u002Fgenerate_template.py",7296,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fscripts\u002Fgenerate_template.py",{"path":159,"resourceType":150,"resourceTypeDesc":151,"sizeBytes":160,"sourceHtmlUrl":161},"scripts\u002Ftimeline_generator.py",12675,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fscripts\u002Ftimeline_generator.py",{"path":163,"resourceType":150,"resourceTypeDesc":151,"sizeBytes":164,"sourceHtmlUrl":165},"scripts\u002Fvalidate_treatment_plan.py",12098,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Ftreatment-plans\u002Fscripts\u002Fvalidate_treatment_plan.py",[167,180,203,219,244,265],{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":176,"publishedAt":52},"01M6D2HQYSQD9N7MTNDT4A7CBM","demo-skill","Project-scope demo skill for tests.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fworkspace\u002F.agents\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[173],{"categoryNo":174,"categoryName":175,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[177,178,179,37,45],"demo skill","demo","tests",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":192,"publishedAt":52},"01M6D2HM0GCPM0TM2HPG9HHR2R","writing","Writing words people read: the specific thing instead of claims, words to drop, sentences, interface copy (buttons, labels, errors, empty states, confirmations), page copy, notifications and emails, alt text and link text, numbers and dates, words that translate well, documentation and voice. Read before writing a page's copy, an interface's text or a document.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fwriting\u002FSKILL.md",[186,189],{"categoryNo":187,"categoryName":188,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":190,"categoryName":191,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000036","内容创作者",[182,193,194,195,196,197,45,198,199,200,201,202],"text","emails","empty","drop","document","page","voice","notifications","documentation","translate",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":212,"publishedAt":52},"01M6D2HG07YS49NM196Q0R3AZ8","ui","Designing or restyling an interface: direction, layout, type, colour, icons, components, states, responsive behaviour. Read before building a page, a screen or a set of components.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui\u002FSKILL.md",[209],{"categoryNo":210,"categoryName":211,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师",[205,213,214,215,216,198,217,45,218],"icons","components","SET","responsive","layout","before building",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":229,"publishedAt":52},"01M6D2HB59HZHWG1RYZDV4SJ91","ui-themes","Light and dark themes, and colour that holds in both: tokens with a value per theme, and what each kind of content needs to stay visible (icons, SVG drawings and line art, logos, photos, screenshots, charts, code, maps, borders, shadows, focus, form controls), switching without a flash, and checking both. Read before building a second theme or a theme toggle, and before any drawing, logo or chart on a page that has two themes.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-themes\u002FSKILL.md",[225,228],{"categoryNo":226,"categoryName":227,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[205,230,231,232,233,234,235,236,237,45,218,238,198,239,240,241,213,242,243],"ui themes","switching","photos","tokens","drawing","focus","maps","Art","flash","code","Charts","content","screenshots","logo",{"skillNo":245,"name":246,"nameZh":6,"description":247,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":248,"categories":249,"keywords":253,"publishedAt":52},"01M6D2H5R5KRAE524C8QX0T7Q0","ui-structure","Structure before styling: the blueprint written before any interface code (the screen's job, the regions its kind of page needs, their order and why, the layout skeleton in numbers, the components and their states), the anatomy and order of a homepage, a dashboard, a list, a detail page, settings, a form, sign-in, pricing, docs, an article and a checkout, and how to turn the blueprint into code (tokens, layout primitives, components, sections, page). Read first, before building or rebuilding any page or screen.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-structure\u002FSKILL.md",[250,251,252],{"categoryNo":187,"categoryName":188,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},{"categoryNo":190,"categoryName":191,"taxonomyType":29,"taxonomyTypeDesc":30},[254,205,255,214,256,257,239,258,259,260,217,233,43,261,262,45,218,198,263,264],"structure","ui structure","pricing","dashboard","Blueprint","article","anatomy","primitives","list","why","how",{"skillNo":266,"name":267,"nameZh":6,"description":268,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":269,"categories":270,"keywords":274,"publishedAt":52},"01M6D2H0ZZBJG77MBGPZHA6MWD","ui-stack-vue","Building interfaces in Vue 3 and Nuxt: project layout, script setup with typed defineProps, defineEmits and defineModel, attribute fallthrough, slots and scoped slots, template refs, ref, reactive and computed, watch versus watchEffect, composables and VueUse, provide and inject, Pinia, keyed v-for, transitions, Nuxt 4 (app directory, pages, layouts, useFetch and useAsyncData keys, $fetch in handlers, server routes, runtime config, useSeoMeta, NuxtImg, middleware), VeeValidate forms, Reka UI and Nuxt UI, testing, vue-tsc, and the traps. Read when the project uses Vue or Nuxt.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-stack-vue\u002FSKILL.md",[271,272,273],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":210,"categoryName":211,"taxonomyType":29,"taxonomyTypeDesc":30},[205,275,276,277,278,279,280,281,217,37,282,283,45,284,285,286,287,288,289,44],"vue","stack","ui stack vue","forms","pages","watch","runtime","transitions","fetch","pinia","nuxt","template","server","config","directory"]