React Native code reuse: Architecture that works
summary
Claims 85% code reuse between Android and iOS and shows how to reach it: share pure JavaScript logic, keep UI code platform-specific with filename suffixes rather than runtime Platform.OS checks when possible, favor composition over inheritance, and use presenters to keep logic out of views. Covers reusing code with web apps (separate module, different build needs) and pain points like npm link instability, native dependencies leaking into libraries, and the tradeoff between native navigation and declarative approaches.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:37Survey
- 1:30The Promise
- 4:50Android & iOS
- 5:54What CAN'T you share?
- 10:38Composition Inheritance
- 17:49Web Apps
- 18:30Architecture Matters
- 26:11Multiple Projects
- 30:09Dependency Hell
related talks
59mOne Codebase to Rule Them All - Using React Native Everywhere
29mOrganizing Code for Cross-Platform Web and Mobile Development
44mBest Practices to Build Scalable React Native Apps
01h 01mReact Native: A Better Way to Do Mobile
44mReact Native: how to succeed with your mobile app
41mReact Native - A native love story
09mGoing Native: Reusing Code
28mCross-Platform React
