Native Modules & Compatibility
Solid Native reuses React Native's native autolinking, Codegen, TurboModules, and Fabric component infrastructure—without loading React at runtime.
What works out of the box#
React Native packages fall into three clear categories in Solid Native:
| Package category | Works directly? | How Solid Native integrates it |
|---|---|---|
| Pure native TurboModules (storage, biometrics, crypto, notifications) | Yes | Autolinked normally; call via generated typed Solid bindings |
| Native Fabric components (screens, safe area, camera, maps) | Yes | Autolinked natively; exposed via typed Solid descriptors |
React JS wrappers & UI kits (importing react or React hooks) | No | Replace the thin JS layer with a Solid adapter (@solidnative-dev/*) |
Generating typed Solid bindings#
sn generate scans your app's specs/ directory and requested third-party libraries for React Native Codegen specs, then emits a typed Solid TypeScript binding file—with zero React imports:
sn generate \
--platform all \
--solid-library @react-native-async-storage/async-storageTo scaffold an owner-safe Solid adapter around a generated TurboModule:
sn adapter create RNAsyncStorage \
--library @react-native-async-storage/async-storage \
--output adapters/RNAsyncStorage.tsAuditing library compatibility#
Check your project's native dependencies and verify every declared compatibility claim against installed packages and native autolinking:
sn compatibility check
sn compatibility check --platform ios --jsonThe compatibility check confirms that:
- Every claimed TurboModule or Fabric component matches an installed native spec.
- Production bundles stay 100% free of
reactor React-wrapped JS barrels (sn bundle sources). - Native build compatibility fingerprints stay deterministic across iOS and Android releases.
First-party native packages#
Common mobile capabilities already ship as owner-safe Solid adapters with zero React runtime imports:
- Storage & secrets:
@solidnative-dev/storage,@solidnative-dev/secure-storage - Networking & links:
@solidnative-dev/networking,@solidnative-dev/linking,@solidnative-dev/sharing - Media & device:
@solidnative-dev/camera,@solidnative-dev/images,@solidnative-dev/notifications,@solidnative-dev/vibration - UI & system:
@solidnative-dev/navigation,@solidnative-dev/dialogs,@solidnative-dev/clipboard,@solidnative-dev/localization,@solidnative-dev/accessibility