React Native Code Reuse
Architecture that Works
Aaron Greenwald
“...that approach yielded around 85% reuse of app code”
- Facebook
“Don’t repeat yourself. It’s not only repetitive, it’s redundant, and people have heard it before.”
- Lemony Snicket
Android & iOS
Web Apps
Other RN Projects
import InputBox from './InputBox';
Composition
>
Inheritance
Logic should be cross platform
Keep logic out of views
Presenters/Dispatchers
HOCs, Hooks, ${new_cool_thing}
Completely separate UI
Create a separate module
Reusable application logic
Compilation gets complicated
npm/yarn link...