How can we have one codebase for mobile and web when both of them have different APIs and behavior? Sanket covered the behavioral and technical differences between web and mobile platforms.
Watch on YouTube: https://www.youtube.com/watch?v=m6HgfkCYiT8
14. Approach #1
One Code
Native Platforms
Widgets
Canvas
Events
Source Framework
Thin glue, minimal mapping to get it up and running
Guarantees consistency
Pros
15. Approach #1
One Code
Native Platforms
Widgets
Canvas
Events
Source Framework
Platform level UI patterns need to be reimplemented
Native accessibility can be hard to achieve
Cons
21. Approach #2
One Code
Native Platforms
Widgets
Canvas
Events
Source Framework
No need of reimplementing platform level UI patterns
Native accessibility is easy to implement
Pros
Adding new components is easier
22. Approach #2
One Code
Native Platforms
Widgets
Canvas
Events
Source Framework
Mapping every component for every target platform
Doesn’t guarantee consistency
Cons
127. Respecting the Platform
1. Embracing Platform Constraints
2. Learning from Institutional Knowledge
3. Competition Drives Innovation
React Native’s Many Platform Vision
128. Embracing Platform Constraints
We have found that by approaching these problems with React
Native, we can more easily borrow lessons learned and code
written for one platform, and apply them to other platforms.
React Native’s Many Platform Vision
129. Learning from Institutional
Knowledge
We believe that by targeting more platforms, we can accelerate
cross-pollination of institutional knowledge between platform
experts.
React Native’s Many Platform Vision
130. Competition Drives Innovation
We believe that competition leads to better outcomes for
everyone in the long run.
React Native’s Many Platform Vision