Native Module and SDK Patterns
Native integrations are where many React Native apps become hard to upgrade. The solution is not to avoid native code entirely. The solution is to isolate and document it.
Integration model
Prefer this layering:
feature code
-> app-owned service interface
-> native wrapper module
-> third-party SDK or custom native implementation
This keeps feature code independent from the integration detail.
Good wrapper responsibilities
- permission handling orchestration
- error normalization
- analytics hooks
- platform differences
- fallback behavior
Example use cases
- payments SDK
- enterprise SSO
- push notifications
- biometrics
- camera/media processing
When custom native code is justified
- no dependable package exists
- performance-sensitive rendering or device access is required
- a proprietary enterprise SDK must be integrated
- a host-native app needs a deeply controlled bridge
Review checklist
- Is the public interface typed and documented?
- Is there a JavaScript-side fallback or denial flow?
- Are native errors mapped to app-owned error shapes?
- Is there a migration plan if the SDK changes vendors or APIs?
Team rule
The app should depend on your wrapper contract, not on the vendor contract directly.