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 - Bringing modern web technologies...
Search
Lidan
May 25, 2016
Technology
5
530
React Native - Bringing modern web technologies to mobile
Lidan Hifi, Wix.com
Lidan
May 25, 2016
Tweet
Share
More Decks by Lidan
See All by Lidan
Building Event-Driven Microservices with Event Sourcing and CQRS
lidanh
8
3.2k
Dev-Centric Culture at Wix - The Developer's Perspective
lidanh
0
550
How Did Nature Inspire Me To Solve The Ciphertext-only Attack
lidanh
0
150
Object Relational Mapping in Scala
lidanh
0
400
Behavioral Design Patterns
lidanh
2
170
Facebook Platform For .net Developers
lidanh
0
140
Other Decks in Technology
See All in Technology
Nekko Cloud、 これまでとこれから ~学生サークルが作る、 小さなクラウド
logica0419
2
730
FastConnect の冗長性
ocise
1
9.6k
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
770
Googleマップ/Earthが一般化した 地図タイルのイマ
mapconcierge4agu
1
200
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
2
390
Platform Engineeringは自由のめまい
nwiizo
4
1.9k
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
120
テストアーキテクチャ設計で実現する高品質で高スピードな開発の実践 / Test Architecture Design in Practice
ropqa
3
710
The 5 Obstacles to High-Performing Teams
mdalmijn
0
270
APIファーストで実現する運用性の高い IoT プラットフォーム: SORACOMのアプローチ
soracom
PRO
0
240
リーダブルテストコード 〜メンテナンスしやすい テストコードを作成する方法を考える〜 #DevSumi #DevSumiB / Readable test code
nihonbuson
11
5.8k
トラシューアニマルになろう ~開発者だからこそできる、安定したサービス作りの秘訣~
jacopen
2
1.5k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
540
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Being A Developer After 40
akosma
89
590k
Writing Fast Ruby
sferik
628
61k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
A Philosophy of Restraint
colly
203
16k
What's in a price? How to price your products and services
michaelherold
244
12k
Transcript
React Native Lidan Hifi Fullstack Developer, Wix Bringing modern web
technologies to mobile Engineering
Native Java Objective-C Swift
Cross Platform PhoneGap Titanium Ionic Sencha Touch
Native Development Sucks*
Slow Development Cycle
Slow Development Cycle Different APIs to Code Same Things
Slow Development Cycle Different APIs to Code Same Things Slow
Deployment Cycle
Slow Development Cycle Different APIs to Code Same Things Slow
Deployment Cycle Separate Platform Teams
Slow Development Cycle Different APIs to Code Same Things Slow
Deployment Cycle Separate Platform Teams
let [ PhoneGap, Trigger.io, Cordova, Ionic, Sencha Touch, Appcelerator Titanium,
...rest ] = stuffWeTriedBefore;
Native Development is more powerful
Stunning UX Develop Quickly
None
Everything was Native
No HTML
No WebView
Wix App is completely powered by JavaScript
React Native
Slow Development Cycle?
Instant Reload
Different APIs to Code Same Things?
90% up to code reuse
Slow Deployment Cycle?
OTA Updates Deploy like you’re on the web
Native Experience
UX of Native Developer Experience of the web
Where’s the Catch?
Many Unsolved Problems
Many Unsolved Problems No Best Practices
Many Unsolved Problems No Best Practices Hard to Test
Many Unsolved Problems No Best Practices Hard to Test Instability
Large Community
How does it work?
Bridge Your App Code Native App React JS
Bridge Your App Code Native App React JS
Bridge Your App Code Native App React JS
Bridge Your App Code Native App React JS
Bridge Your App Code Native App React JS
Bridge Main Thread Background Thread Your App Code Native App
React JS
React JS
Components
Functional UI
Declarative UI Imperative UI: Define Transitions (“how”) Declarative UI: Define
States (“what”)
Declarative UI Predictable
Predictable Confidence
Predictable Confidence
99+ 10
99+ 10
99+ 10
99+ 10
99+ 10 set badge to 99+! sad face! add badge!
remove stars!
10 Imperative UI: Define Transitions 10 99+ 10 10 99+
10 99+ 99+ 99+ 99+ 10 3 states, 9 transitions
10 Imperative UI: Define Transitions 10 99+ 10 10 99+
10 99+ 99+ 99+ 99+ 10 3 states, 9 transitions O(n2)
Imperative UI: Define Transitions if (count == 0) { if
(hasBadge()) { removeBadge(); } if (isSad()) { removeSadFace(); } addStars(); smile(); return; }
Imperative UI: Define Transitions else if (count <= 99) {
if (isSmile()) { removeSmile(); } if (sad()) { removeSadFace(); } if (hasStars()) { removeStars(); } if (!hasBadge()) { addBadge(); } }
Imperative UI: Define Transitions else { if (hasStars()) { removeStars();
} if (!hasBadge()) { addBadge(); } if (isSmile()) { removeSmile(); } setSadFace(); } let count = count > 99 ? '99+' : count.toString(); getBadge().setText(count);
Imperative UI: Define Transitions
Declarative UI: Define States if (count === 0) { return
<Bell style={styles.smile} /> }
Declarative UI: Define States if (count === 0) { return
<Bell style={styles.smile} /> } else if (count <= 99) { return ( <Bell> <Bedge count={count} /> </Bell> ); }
Declarative UI: Define States if (count === 0) { return
<Bell style={styles.smile} /> } else { return ( <Bell style={styles.sad}> <Badge count="99+" /> </Bell> ); } else if (count <= 99) { return ( <Bell> <Bedge count={count} /> </Bell> ); }
React Component render() { } } class HelloMessage extends React.Component
{ return <div>Hello {this.props.name}</div>;
React Component render() { } } class HelloMessage extends React.Component
{ return <div>Hello {this.props.name}</div>;
React Component render() { } } class HelloMessage extends React.Component
{ return <div>Hello {this.props.name}</div>;
React Component render() { } } class HelloMessage extends React.Component
{ return <div>Hello {this.props.name}</div>;
React Component render() { } } class HelloMessage extends React.Component
{ return <div>Hello {this.props.name}</div>; <HelloMessage name="Lidan" />
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); }
React Component: Adding State class Counter extends React.Component { }
constructor(props) { super(props); this.state = {count: 0}; this.tick = this.tick.bind(this); } tick() { this.setState({count: this.state.count + 1}); } render() { return ( <div onClick={this.tick}> Clicks: {this.state.count} </div> ); } <Counter />
From Web to Mobile <div /> <View /> UIView <span
/> <Text /> UILabel <img /> <Image /> UIImageView web react-native iOS native
React Native Components ActivityIndicatorIOS DatePickerIOS DrawerLayoutAndroid Image ListView MapView Modal
Navigator PickerIOS Picker ProgressBarAndroid ProgressViewIOS WebView ScrollView SegmentedControlIOS Slider SliderIOS StatusBar Switch TabBarIOS TabBarIOS.Item Text TextInput ToolbarAndroid View
None
react-native-controllers https://github.com/wix/react-native-controllers
react-native-notifications Interactive Notifications Background Notifications Managed Notifications https://github.com/wix/react-native-controllers
Getting Started • Install NodeJS • Install React Native npm
install -g react-native-cli • Create a new RN project react-native init MyProject • Run the application react-native run-ios react-native run-android
References React Native Official docs- facebook.github.io/react-native Make it Open- Building
the F8 App— makeitopen.com Wix Engineering- www.wix.engineering Awesome react native- https://github.com/jondot/awesome-react-native
References React Native Official docs- facebook.github.io/react-native Make it Open- Building
the F8 App— makeitopen.com Wix Engineering- www.wix.engineering Awesome react native- https://github.com/jondot/awesome-react-native
References React Native Official docs- facebook.github.io/react-native Make it Open- Building
the F8 App— makeitopen.com Wix Engineering- www.wix.engineering Awesome react native- https://github.com/jondot/awesome-react-native
References React Native Official docs- facebook.github.io/react-native Make it Open- Building
the F8 App— makeitopen.com Wix Engineering- www.wix.engineering Awesome react native- https://github.com/jondot/awesome-react-native
References React Native Official docs- facebook.github.io/react-native Make it Open- Building
the F8 App— makeitopen.com Wix Engineering- www.wix.engineering Awesome react native- https://github.com/jondot/awesome-react-native
Questions? Engineering @lidanh