React Native
Contents
1.Introduction
2.Building first scenes
3.Networking/Navigation
4.Performance
5.?
Why do we like native?
Native applications
1. Performance
2. Gestures
3. Animations
4. UI
Why is it difficult to develop?
I need...
1. Technology stack
a. iOS
b. Android
2. Code reuse
3. Development time
Instead
1. Technology stack
a. iOS
b. Android
2. Code reuse
3. Development time
1. JavaScript
a. -
b. -
2. Same shared logic
3. Ctrl+R
Do we have an alternative?
Yes!
1. Cordova (PhoneGap) + Ionic
2. JavaScript Native
3. React Native
Should we use them?
JavaScript Native (2015)
1. Simple applications
2. Performance
3. Angular JS
4. Community
5. Documentation
Ionic + PhoneGap (May 2015)
1. Angular JS
2. Native API access
3. Community
4. Performance
5. Hybrid
Isn’t Hybrid a solution?
HTML5 Application
(HTML + CSS + JS)
Rendering Layer
(Web View)
File JS
Camera
JS
Media
JS
GPS JS
Cordova Bridge
(Abstraction Layer)
File API
Camera
API
Media
API
GPS API
Phone Operative System
(iOS, Android, Windows Phone)
Time to React Native!
History timeline
Ads manager
1. Post Promote: 99%
2. SMS Captcha Checkpoint: 97%
3. Comment Moderation: 85%
4. Lead Gen Ads: 87%
5. Push Notification Settings: 92%
85%
Who’s using it?
They are so cool that all job is done
by…. Bots!
Available for
Android 4.1+ iOS 8+
What’s with win Phone?
Nope
H
What should I know before?
React + Redux
1.Actions
2.Reducers
3.State
4.Props
Navigation is… COMPLEX!
Code
Do we have the same components?
Instead of:
<div>
<span>
<section>
UI component library
https://react.parts/native
What about styles?
StyleSheet
var styles = StyleSheet.create({
base: {
width: 38,
height: 38,
},
background: {
backgroundColor: '#222222',
},
active: {
borderWidth: 2,
borderColor: '#00ff00',
},
});
<Text style={styles.base} />
<View style={styles.background} />
Flex
Density independent pixels
What’s inside?
Under the hood
1.Present in iOS
2.Absent in Android
=> HelloWorld app 3.5MB
Threads
Tools
React Native for Web
Profiler
Debugger
React Native Debugger
Reactotron
Ignite
> ignite new MyApplication
Setting up an application
CLI
> npm install -g react-native-cli
> react-native run-android [run-ios]
https://developer.android.com/studio/install.htm
https://developer.apple.com/xcode/
Installing necessary SDK
File structure
Questions?
Academy PRO: React Native - introduction

Academy PRO: React Native - introduction