Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React Native
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sing Jie Lee
April 22, 2016
Technology
90
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React Native
Sing Jie Lee
April 22, 2016
More Decks by Sing Jie Lee
See All by Sing Jie Lee
Infocomm Media Youth Festival 2016 - Career Talk
singjie
0
58
Sprite Kit
singjie
0
59
SiriKit
singjie
0
210
Arduino
singjie
0
45
Software Engineering
singjie
0
57
Advanced Core Data
singjie
0
42
Amazon Echo and Home Integration
singjie
0
100
CS3216 Garena Project X
singjie
0
53
Life
singjie
0
43
Other Decks in Technology
See All in Technology
事業会社における 機械学習・推薦システム技術の活用事例と必要な能力 / ml-recsys-in-layerx-wantedly-2026
yuya4
0
160
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
23
7.5k
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
100
GitHub Copilot app最速の発信の裏側
tomokusaba
1
250
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
160
When Platform Engineering Meets GenAI
sucitw
0
170
感情と身体を置き去りにしない、エンジニアの生きのこり方 ──いまから、ここから「自分の状態」を扱うという選択
saorimurooka
0
330
2026 AI Memory Architecture
nagatsu
0
100
フィジカル版Github Onshapeの紹介
shiba_8ro
0
320
Comment regagner la souveraineté de vos données tout en étant payé grâce à Nostr !
rlifchitz
0
200
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
400
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
20
7.4k
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
370
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
AI: The stuff that nobody shows you
jnunemaker
PRO
8
730
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Joys of Absence: A Defence of Solitary Play
codingconduct
1
400
HDC tutorial
michielstock
2
720
Designing for Timeless Needs
cassininazir
1
260
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Transcript
REACT NATIVE LEE SING JIE
CREATED BY FACEBOOK
– https://facebook.github.io/react-native/ “The focus of React Native is on developer
efficiency across all the platforms you care about — learn once, write anywhere.”
PROBLEMS WITH NATIVE • Slow development cycle • Slow deployment
cycle • Different API for same thing • Separate platform teams
WEB / CROSS-PLATFORM • Poor Performance • Non-Native Feel •
Limited feature support • Hackish
None
None
REACT NATIVE • Slow development cycle • Slow deployment cycle
• Different API for same thing • Separate platform teams • Instant Reload • OTA Updates • Common APIs • Shared Skill set
ADVANTAGES • CMD+R • Javascript! Learn once, write anywhere •
Functional UI • Flexbox layout • Highly extensible
JAVASCRIPT import React, { AppRegistry, Component, StyleSheet, Text, View }
from 'react-native'; class EmmaLee extends Component { render() { return ( React.createElement(Text, {style: styles.welcome}, “Welcome to React Native!”) ); } } var styles = StyleSheet.create({ welcome: { fontSize: 30,textAlign: ‘center’ } }); AppRegistry.registerComponent('EmmaLee', () => EmmaLee);
JSX import React, { AppRegistry, Component, StyleSheet, Text, View }
from 'react-native'; class EmmaLee extends Component { render() { return ( <Text style={styles.welcome}> Welcome to React Native! </Text> ); } } var styles = StyleSheet.create({ welcome: { fontSize: 30,textAlign: ‘center’ } }); AppRegistry.registerComponent('EmmaLee', () => EmmaLee);
ASYNC EXECUTION JavaScript Thread Main Thread Shadow Thread Cache Thread
ASYNC EXECUTION
FLEXBOX LAYOUT • flexDirection • justifyContent • alignItems • flex
• flexWrap
FUNCTIONAL UI import React, { AppRegistry, Component, StyleSheet, Text, View
} from 'react-native'; class EmmaLee extends Component { render() { return ( <Text style={styles.welcome}> Welcome to React Native! </Text> ); } } var styles = StyleSheet.create({ welcome: { fontSize: 30,textAlign: ‘center’ } }); AppRegistry.registerComponent('EmmaLee', () => EmmaLee);
FUNCTIONAL UI this.state this.state.text2 this.state.text1 render() { return ( <View
style={styles.container}> <Text style={styles.text}>{this.state.text1}</Text> <Image style={styles.image} source={{uri: "some_url"}}/> <Text style={styles.text}>{this.state.text2}</Text> </View> ); }
FUNCTIONAL UI this.state I You constructor(props) { super(props); this.state =
{ text1: "I", text2: "You", }; }
FUNCTIONAL UI this.state onSomeEvent() { this.setState({ text1: "Vincent Nguyen", text2:
"Omer Iqbal" }) } Vincent Nguyen Omer Iqbal
LET'S BUILD AN APP
EXTENSIBLE • Native UI Components • Native Modules
NATIVE UI COMPONENTS // RCTMapManager.m #import <MapKit/MapKit.h> #import "RCTViewManager.h" @interface
RCTMapManager : RCTViewManager @end @implementation RCTMapManager RCT_EXPORT_MODULE() - (UIView *)view { return [[MKMapView alloc] init]; } @end import { requireNativeComponent } from 'react-native'; module.exports = requireNativeComponent('RCTMap', null); Objective-C Javascript
NATIVE UI COMPONENTS
DEMO
NATIVE MODULES // CalendarManager.h #import "RCTBridgeModule.h" @interface CalendarManager : NSObject
<RCTBridgeModule> @end // CalendarManager.m @implementation CalendarManager RCT_EXPORT_MODULE(); RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location) { NSLog(@"Pretending to create an event %@ at %@", name, location); } @end import { NativeModules } from 'react-native'; var CalendarManager = NativeModules.CalendarManager; CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey'); Objective-C Javascript
NATIVE MODULES
DEMO
OTA UPDATE "react-native bundle --entry-file index.ios.js -- bundle-output ios.bundle --dev
false"
DEMO
–Chai Haoqiang “I took only two hours to do Shopee
page using React Native”
None
QUESTIONS?
Credits: - http://www.slideshare.net/tlv-ios-dev/pieter-de-baets-an-introduction-to-react-native - https://facebook.github.io/react-native/docs - https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties