React Native
React Native
CTO at TakeMeTour
Full-stack developer
DevOps beginner
Chern
RANATCHAI CHERNBAMRUNG
CTO at NextCover
Full-stack developer
DevOps beginner
History of JavaScript
NodeJS
JavaScript
1997 2009
PhoneG
What is great about Web technology
Open standards
Instant distribution
Fast iteration
Unified team
Open standards
Instant distribution
Fast iteration
Unified team
Open standards
Instant distribution
Fast iteration
Unified team
Open standards
Instant distribution
Fast iteration
Unified team
– Eric Baer
React
DOM <div>
<img src=“/logo.png” />
</div>
React Native
Native Component
<View>
<Image source={require(‘logo.png’)} />
</View>
React Native
vs
Ionic/Cordova
React Native Ionic/Cordova
Hot Reloading ✓ ✗
Code Push ✓ ✓
Code Sharing ✓ ✗
React Native Native
Code Sharing ✓ ✗
Code Sharing ✓ ✗
Code Sharing ✓ ✗
Code Sharing ✓ ✗
Code Sharing ✓ ✗
Code Sharing ✓ ✗
“JavaScript will be the next universal
language after English”
– Mark Zuckerberg
didn’t said
Let’s get hands-on!
WORKSHOP TIME!
React Native In Touch
https://github.com/ranatchai/react-native-bkk-example
Slide № 23
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 24
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 25
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 26
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 27
Thing We Learn
https://github.com/ranatchai/react-native-bkk-example
Slide № 28
Code Overview
https://github.com/ranatchai/react-native-bkk-example
Slide № 29
Project Structure
Slide № 30
Slide № 31
Slide № 32
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 33
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 34
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 35
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 36
Slide № 37
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 38
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 39
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 40
Thing We Learn
https://github.com/ranatchai/react-native-bkk-example
Slide № 41
Code Overview (2)
https://github.com/ranatchai/react-native-bkk-example
Slide № 42
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 43
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 44
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 45
nativebase.io
Bootstrap in React-Native
Slide № 46
nativebase.io
Slide № 51
Run Packager
$ react-native start
Slide № 52
Run Packager
$ react-native start
Slide № 53
Run Packager
$ react-native start
$ react-native run-ios
Run iOS
Slide № 54
Run Packager
$ react-native start
$ react-native run-ios
Run iOS
Slide № 55
Run Packager
$ react-native start
$ android avd
Slide № 56
$ react-native avd
Run Android
Slide № 57
$ react-native start
Slide № 58
$ react-native start
$ react-native run-android
Run Android
Slide № 59
$ react-native start
$ react-native run-android
Run Android
Slide № 60
Open Dev tools iOS
CMD + D
https://github.com/ranatchai/react-native-bkk-example Slide № 61
Open Dev tools Android
CMD + M
https://github.com/ranatchai/react-native-bkk-example Slide № 62
Hot reload and Live reload
Slide № 63
Enable Live Reload
https://github.com/ranatchai/react-native-bkk-example Slide № 64
Live Reload Demo
https://youtu.be/urbcszfA7yU
https://github.com/ranatchai/react-native-bkk-example Slide № 65
Enable Hot Reload
https://github.com/ranatchai/react-native-bkk-example Slide № 66
Hot Reload Demo
https://youtu.be/bfKyoBcu8b0
https://github.com/ranatchai/react-native-bkk-example Slide № 67
Enable Remote Debugging
https://github.com/ranatchai/react-native-bkk-example Slide № 68
Debugger: Chrome Dev Tools
https://github.com/ranatchai/react-native-bkk-example Slide № 69
React Native Debugger
https://github.com/jhen0409/react-native-debugger Slide № 70
React Native Debugger
https://github.com/jhen0409/react-native-debugger Slide № 71
React Native Debugger
https://github.com/jhen0409/react-native-debugger Slide № 72
Thing We Learn
https://github.com/ranatchai/react-native-bkk-example
Slide № 73
Everyting is Great but…
Slide № 74
Study from Full Stack Boilerplate
https://github.com/futurice/pepperoni-app-kit
Slide № 75
Who are using React Native?
Gyroscope QQ Discord
Ready for Production?
• New versions are coming very fast, some have
breaking changes
• Open-sourced components are sufficient, but there
are some open issues
• There are some limitations on styling components in
tricky cases, native bridge is needed
• TakeMeTour was able to launch its first version in both
platforms within 2 weeks of development
• An intern took the code written for iOS and made it
run *NATIVELY* on Android within 2 days
Tip & Trick
https://github.com/ranatchai/react-native-bkk-example
Slide № 78
How to Find Component
https://js.coach
Slide № 79
Next Generation IDE
for building React Native
https://decosoftware.com
Slide № 80
React Native for Web & Desktop App
Web
https://github.com/necolas/
react-native-web
Mac
https://github.com/ptmt/
react-native-macos
Ubuntu
https://github.com/
CanonicalLtd/react-native
Slide № 81
Old
Slide № 82
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 83
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 84
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 85
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 86
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 87
Slide № 88
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 89
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 90
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 91
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 92
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 93
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 94
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 95
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 96
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 97
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 98
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 99
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 100
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 101
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 102
Android
iOS
https://github.com/ranatchai/react-native-bkk-example Slide № 103