React Native is a JavaScript library for building user interfaces that allows developers to build mobile apps using React and write native code for iOS and Android. It allows building native UI components with JavaScript and rendering them using the native platform, avoiding cross-platform issues. While not a hybrid framework, it allows fully integrating with native APIs and using native components while writing application logic in JavaScript.
2. About the author
● CTO @ Polidea
● Founder of Mobile Warsaw
● Founder and organizer of mceconf.com
2
3. ● not a Hybrid App framework
● no HTML/DOM, CSS*
● no cross-platform app tool
● no application architecture framework
● no, you cannot use jquery plugins with it*
What RN is not
3
4. A JAVASCRIPT LIBRARY
FOR BUILDING USER INTERFACES
What RN is
Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.
4
5. ● native UI components
● fully asynchronous UI
● no two-way data-binding
● no application architecture lock-in
● great for modern patterns
○ CQRS (Domain Driven Design and Event Sourcing)
○ Flux (Facebook pattern)
No architecture lock-in
5
6. Components - fundamental building blocks
● state machine
● properties
● render method (JSX)
● flexbox css-like style
● composable
6
16. States and Virtual View Hierarchy
Component
State
Your
code
Render
(in javascript)
View
Virtual View Hierarchy
Javascript objects
Image
Image
Text
React
Build native views
(native code)
16
20. Native/Javascript bridge
● Javascript runs in non-UI thread
● Asynchronous, serializable communication
● Batching requests
● Lots of optimisations
● More potential optimisations in the future
● Flexible threading model
20
21. Animations
● LayoutAnimations - simple
● Animated - fine grained control
○ Value animations still in javascript
○ Will be native soon
○ Declarative
21
24. Integration with native code
● Native APIs: iOS/Android
● Native UI components: iOS/Android
● Direct Properties access: iOS/Android (?)
● Embed RN view in Native app: iOS for now
24
25. ● Intellij Idea/Webstorm with JSX Harmony
● Live Reloads
● Support for debugging via Chrome tools
● React Chrome extension
● Modify code in debugger
Developer’s toolchain - web-developer’s like
25
26. Developer’s toolchain goodies
● Fast packager
● Verbose error diagnostic
● Element Inspections
● Profiling
● JS Tests
● Integration tests and Snapshot tests (iOS for now)
● UIExplorer
26
34. Facebook goals (what they told)
● Learn once - write anywhere
● No “cross-platform app framework”
● Less complex apps with React
34
35. ● A lot of common code shared
● Reuse of existing libraries
● Built-in cross-platform support (soon)
● Dynamic app updates (A/B testing)
Facebook achievements
35
36. Is it ready yet?
● Still changing fast
● Some small issues with performance
● Needs verification with big application
● (but Facebook made AdsManager)
● Some components are beta
● A number of community components
● Slowly growing community
● “Distributed” documentation
36