Skip to main content

Architecture

┌─────────────────────────────────────────────────┐
│ JS (Hermes on watch) │
│ React 19 → react-reconciler (custom host) │
└──────────────────────┬──────────────────────────┘
│ JSI
┌──────────────────────▼──────────────────────────┐
│ ReactNativeWatchOSCxx │
│ Hermes host, TurboModule registry, UI manager, │
│ XHR/WebSocket, event emitter │
└──────────────────────┬──────────────────────────┘

┌──────────────────────▼──────────────────────────┐
│ ReactNativeWatchOS (Swift) │
│ RNWRootView + ViewRegistry / ModifierRegistry│
│ → native SwiftUI view tree │
└─────────────────────────────────────────────────┘

The three layers

  1. JS — Your React tree, running in Hermes. Reconciliation is handled by a custom host config targeting react-reconciler 0.32.x.
  2. C++/Obj-C++ bridge — Hosts Hermes, owns the TurboModule registry, implements JSI shims (fetch, XMLHttpRequest, WebSocket, timers, console), and routes UI commands to the Swift layer.
  3. Swift (SwiftUI) — Reads the shadow tree snapshot, looks up each node in ViewRegistry, applies its props via ModifierRegistry, and emits a real SwiftUI view tree from RNWRootView.

Key files