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
540
How Did Nature Inspire Me To Solve The Ciphertext-only Attack
lidanh
0
150
Object Relational Mapping in Scala
lidanh
0
390
Behavioral Design Patterns
lidanh
2
170
Facebook Platform For .net Developers
lidanh
0
140
Other Decks in Technology
See All in Technology
State of Open Source Web Mapping Libraries
dayjournal
0
240
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
31
9.1k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
110
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
200
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
組み込みLinuxの時系列
puhitaku
4
1.1k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
230
Team Dynamicsを目指すウイングアーク1stのQAチーム
sadonosake
1
320
強いチームと開発生産性
onk
PRO
30
10k
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
370
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
いざ、BSC討伐の旅
nikinusu
2
750
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
BBQ
matthewcrist
85
9.3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
GraphQLとの向き合い方2022年版
quramy
43
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
What's in a price? How to price your products and services
michaelherold
243
12k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Teambox: Starting and Learning
jrom
133
8.8k
Code Review Best Practice
trishagee
64
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
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