react-native-architect
Architect-level React Native guidance — the new architecture boundary (JSI/Fabric/TurboModules), when to write native code, navigation and state ownership, list and image performance, OTA update policy, and the shared-codebase structure that keeps the JS and native sides honest. Use for React Native apps.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- react-native-architect
- license
- MIT
- metadata
- { "crusor-path": "mobile-architect/platforms-architect/react-native-architect", "crusor-domain": "mobile-architect", "crusor-origin": "original", "crusor-sources": "reactnative.dev/docs; reactnative.dev/architecture; docs.expo.dev", "crusor-triggers": "react native, expo, fabric, turbo modules, jsi, metro, mobile react, native module", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level React Native guidance — the new architecture boundary (JSI/Fabric/TurboModules), when to write native code, navigation and state ownership, list and image performance, OTA update policy, and the shared-codebase structure that keeps the JS and native sides honest. Use for React Native apps.
- compatibility
- React Native 0.74+ (New Architecture); Expo or bare
03 SKILL.md 正文
React Native Architect
React Native is a JavaScript runtime hosting native views. Every performance and capability question is answered at that boundary.
When to use
- A web/TypeScript team shipping to both stores.
- Business-facing UI with moderate platform integration.
- Sharing domain logic with an existing React codebase.
When NOT to use
- Heavy graphics, audio DSP, or deep platform SDK integration (native is cheaper than bridged workarounds).
- Pixel-identical design requirements across platforms (see
flutter-architect).
Decision 1 — Architecture boundary
| Layer | Runs in |
|---|---|
| business logic, state, validation | JS/TS |
| navigation | JS (React Navigation) |
| media, sensors, crypto, push | native module (TurboModule) |
| heavy rendering | native view, wrapped |
- New Architecture (JSI/Fabric) is the default assumption: no bridge-batching excuses, but async-native calls still cost.
- Write a native module when a JS workaround costs more than the module; keep it behind a TS interface in the domain.
- Anything on the JS thread blocks the UI thread's effects: keep it small.
Decision 2 — Project structure
src/app/ navigation, providers
src/features/ feature modules (screens, hooks, state)
src/domain/ entities and rules, platform-free
src/data/ api clients, local db, sync
native/ module interfaces + platform implementations
- Feature-first, not type-first; a "components/" barrel for everything rots.
- One navigation tree, deep links declared once, typed route params.
- State: local first, then a store; server state via TanStack Query (see
tanstack-query-architect).
Decision 3 — Performance rules that matter
- Lists: FlatList/FlashList with
keyExtractor,getItemLayoutwhere possible, memoised row components, no inline arrow props per row. - Images: sized, cached, and never decoded on the JS thread at full resolution.
- Animations: Reanimated on the UI thread, not
Animateddriven by JS state. - Startup: lazy screens, deferred native module init, measure with a release build (dev builds lie).
- Re-render discipline: narrow selectors,
React.memowhere measured — not everywhere.
Decision 4 — Native integration
- Permissions and capabilities behind a typed interface with a JS fallback
(
isAvailable). - iOS/Android implementations live next to each other; a missing platform is a compile-time or runtime-checked error, never a silent no-op.
- Native versions pinned; upgrading RN is a scheduled project, not a patch.
Decision 5 — Release and updates
- OTA updates (EAS Update/CodePush-style) only for JS, never for native changes; a broken native build still needs review.
- Runtime version pinning: an OTA must never target a binary it was not built for.
- Crash reporting with JS error boundaries per screen; a crash in one screen must not white-screen the app.
- Feature flags for anything risky, because rollback is a release.
Failure modes at scale
- Everything in one giant
App.tsxwith navigation and providers entangled. - JS-thread work in scroll handlers → dropped frames on mid-tier Android.
- Native module with no JS-side capability check → crash on the other platform.
- OTA shipped to an incompatible binary version → immediate crash loop.
- "Works in dev build" performance claims that vanish in release.
Verification receipts
- Release-build profile: cold start, JS thread FPS during scroll.
- List performance on a 5,000-item dataset.
- Native module matrix: iOS + Android behaviour verified separately.
- OTA compatibility test: runtime version mismatch refused.
- Crash-free session rate by screen after release.
04 同仓库更多 Skills
interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.