SlideShare a Scribd company logo
Damian Zbrożek
Introduction to React Native
Requirements
● JavaScript
○ React
○ ES6
● CSS
● git
● npm
● phone with Android
React Native
React Native lets you build mobile apps using only JavaScript. It uses the same design as React,
letting you compose a rich mobile UI using declarative components.
Is anybody using it?
Why should I use it?
● It’s still React
● Easy migration path for web developers
● Faster speed of development
○ high code reuse between platforms
○ independent updates (OTA)
○ hot reloading
Why shouldn’t I use it?
● It’s still JS
● Worse performance
● Smaller community
● Lack of libraries for games, VR, AR
How does it work?
JS thread UI threadBridge
Components
● Text
● TextInput
● Button
● Image
● View
● *List
● Slider/Switch/Picker
● DatePickerIOS*
● TouchableNativeFeedback*
API
● AsyncStorage
● Animated
● Dimensions
● Geolocation
● CameraRoll
● StyleSheet
● Vibration
● NetInfo
● Keyboard
● PanResponder
React Native vs Web
Similarities
● It’s still React
● Similar primitive components
○ View == div
○ Text == span
○ TextInput == input
○ Image == img
● Styling
○ CSS like
● React Native for Web
Creating a new project
expo-cli
● easy setup
● simple updates
● rich API (Camera, Contacts, Facebook, Maps, Video, SMS, SQLite)
● OTA updates
● push notifications
● build servers (iOS and Android)
● no native code
react-native-cli
● more complicated setup (Android Studio/Xcode)
● native modules
● full control of the project
● may require additional configuration (react-native link)
Setup
Project
Expo
https://play.google.com/store/apps/details?id=host.exp.exponent
Expo
● open Expo app on Android
● scan QR code
Expo
● shake the app
● open notification menu
Layout
Flex
● flex
● flexDirection
● justifyContent
● alignItems
flex
flexDirection
justifyContent
alignItems
Styles
● inline
● StyleSheet
● Styled Components*
● React Native Extended StyleSheet*
Styles
● dp
● Dimensions API
Inline
StyleSheet
Basic components
(Scroll)View
Text
Image
Challenge
Challenge
Add styles to you app. Pay attention to the
following components:
● AlarmActions
● AlarmActionTile
● AlarmHeader
Nice to have:
● ScrollView
Interaction
TextInput
Touchable*
● TouchableHighlight
● TouchableOpacity
● TouchableNativeFeedback
● Button
Challenge
Challenge
Create two components:
● FormInput
● Button
and turn AddAlarm into functional form.
Nice to have:
● display stars instead of your password
● display number keyboard when typing phone
number
● “add” button should be disabled until you provide
all values
● KeyboardAvoidingView
Lists
Lists
● Optional horizontal mode
● Configurable viewability callbacks
● Header support
● Footer support
● Separator support
● Empty list support
● Pull to Refresh
● ScrollToIndex support
● Multiple columns support
FlatList
SectionList
Challenge
Challenge
You should create a new FlatList inside
AlarmList and use AlarmListItem component
to render items.
Nice to have:
● support empty lists
● ScrollView
Routing
Routing
● React Navigation
● React Native Navigation
React Navigation
React Navigation
Challenge
Challenge
Implement navigation in the app:
● create a stack navigation inside navigation.js
● implement required routing
○ “Create new” button should redirect to
AddAlarm view
○ Single alarm from the list should redirect to
AlarmDetails view and pass alarm as property
○ “Add” button from AddAlarm view should
redirect to AddAlarm view
Nice to have:
● header title inside AlarmDetails view should be
based on the current alarm name
Storage
Storage
● AsyncStorage
● SQLite*
● Realm*
AsyncStorage
Challenge
Challenge
Make data persist again. Modify AlarmsStore
in a way that enables user to:
● add a new alar to the storage
● remove existing alarm from the storage
● load existing alarms when opening the app
SMS
SMS
Two ways to send SMS:
● using messaging app
○ no extra permission
○ easy to implement
○ extra action to take for user
● sending message in background
○ permission must be granted by user
○ harder to implement (require native code)
○ streamline the process (one action instead of two)
SMS
Challenge
Challenge
When a user touches AlarmActionTile we
should open SMS app with premade message
(use # to combine password and code) to
send.
Nice to have:
● disable buttons if SMS is not available
Deploy
Deploy
● update assets
○ assets/icon.png
○ assets/splash.png
● deploy
○ build app
■ Create a new account
■ Let Expo handle the process
○ publish changes
● install APK
Homework
Homework
Sending SMS in the background
● eject project
● install native module (e.g. react-native-sms-x)
● build APK (use Android Studio)
Questions?
Thank you

More Related Content

PPTX
Node.js
Dhananjay Kumar
 
PPTX
Angular4 getting started
TejinderMakkar
 
PPTX
Nodejsvs
Dhananjay Kumar
 
PPTX
Hack'n Break Android Workshop
Elif Boncuk
 
PPTX
Migrating an application from Angular 1 to Angular 2
Ross Dederer
 
PPTX
Drawing Tool
Dinesh Pathak
 
PPTX
Design Patterns every Android developer should know
muratcanbur
 
Angular4 getting started
TejinderMakkar
 
Nodejsvs
Dhananjay Kumar
 
Hack'n Break Android Workshop
Elif Boncuk
 
Migrating an application from Angular 1 to Angular 2
Ross Dederer
 
Drawing Tool
Dinesh Pathak
 
Design Patterns every Android developer should know
muratcanbur
 

What's hot (20)

PDF
Introduction to Angular for .NET Developers
Laurent Duveau
 
PDF
Refreshing Your App in iOS 7
Aviary
 
PDF
Utilizing HTML5 APIs
Ido Green
 
PDF
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
PDF
Dicoding Developer Coaching #13: Android | Melakukan Testing secara Otomatis ...
DicodingEvent
 
PDF
Creating a comp
Kranthi Kumar
 
PDF
Android Modularization
Young-Hyuk Yoo
 
PDF
Angular2 with type script
Ravi Mone
 
PDF
Introduction to react native
Dani Akash
 
PDF
AKiOSMagic Manual
Alex Kir
 
PPTX
Microsoft expression blend 4
Mahesh Shitole
 
PPTX
Android App Development 20150604
Hideo Kadowaki
 
PDF
Angular 2 - The Next Framework
Commit University
 
PPTX
Android Study Jams - Info Session
Google Developer Students Club NIT Silchar
 
PDF
Introduction to angular 4
Marwane El Azami
 
PDF
Angular 2 : le réveil de la force
Nicolas PENNEC
 
PDF
Angular 2... so can I use it now??
Laurent Duveau
 
PPTX
You Know Angular 2, You Know Native Mobile App Development
Lohith Goudagere Nagaraj
 
PDF
Introduction to Angular 2
Naveen Pete
 
PPTX
Flutter
Mohit Sharma
 
Introduction to Angular for .NET Developers
Laurent Duveau
 
Refreshing Your App in iOS 7
Aviary
 
Utilizing HTML5 APIs
Ido Green
 
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
Dicoding Developer Coaching #13: Android | Melakukan Testing secara Otomatis ...
DicodingEvent
 
Creating a comp
Kranthi Kumar
 
Android Modularization
Young-Hyuk Yoo
 
Angular2 with type script
Ravi Mone
 
Introduction to react native
Dani Akash
 
AKiOSMagic Manual
Alex Kir
 
Microsoft expression blend 4
Mahesh Shitole
 
Android App Development 20150604
Hideo Kadowaki
 
Angular 2 - The Next Framework
Commit University
 
Android Study Jams - Info Session
Google Developer Students Club NIT Silchar
 
Introduction to angular 4
Marwane El Azami
 
Angular 2 : le réveil de la force
Nicolas PENNEC
 
Angular 2... so can I use it now??
Laurent Duveau
 
You Know Angular 2, You Know Native Mobile App Development
Lohith Goudagere Nagaraj
 
Introduction to Angular 2
Naveen Pete
 
Flutter
Mohit Sharma
 
Ad

Similar to Introduction to React Native (20)

PPTX
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
PDF
Advanced Dagger talk from 360andev
Mike Nakhimovich
 
PPTX
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
 
PDF
Introduction to html5 game programming with ImpactJs
Luca Galli
 
PDF
React native: building native iOS apps with javascript
Polidea
 
PDF
Running Code in the Android Stack at ABS 2014
Opersys inc.
 
PDF
Running Code in the Android Stack at ELCE 2013
Opersys inc.
 
PDF
Programming for non tech entrepreneurs
Rodrigo Gil
 
PPTX
Basic iOS Training with SWIFT - Part 4
Manoj Ellappan
 
PDF
Philip Shurpik "Architecting React Native app"
Fwdays
 
PDF
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
PDF
Angular.js for beginners
Basia Madej
 
PPTX
Hands on react native
Jay Nagar
 
PDF
Android App Development 01 : Getting Start
Anuchit Chalothorn
 
PPTX
Intro to Flutter SDK
digitaljoni
 
PDF
Building Kick Ass Video Games for the Cloud
Chris Schalk
 
PPTX
What’s new in android o
Ahmed Nabil
 
PPTX
Ignite your app development with Angular, NativeScript and Firebase
Jen Looper
 
PPTX
From React to React Native - Things I wish I knew when I started
sparkfabrik
 
PDF
How to Create Your First Android App Step by Step.pdf
BOSC Tech Labs
 
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
Advanced Dagger talk from 360andev
Mike Nakhimovich
 
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
 
Introduction to html5 game programming with ImpactJs
Luca Galli
 
React native: building native iOS apps with javascript
Polidea
 
Running Code in the Android Stack at ABS 2014
Opersys inc.
 
Running Code in the Android Stack at ELCE 2013
Opersys inc.
 
Programming for non tech entrepreneurs
Rodrigo Gil
 
Basic iOS Training with SWIFT - Part 4
Manoj Ellappan
 
Philip Shurpik "Architecting React Native app"
Fwdays
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
Angular.js for beginners
Basia Madej
 
Hands on react native
Jay Nagar
 
Android App Development 01 : Getting Start
Anuchit Chalothorn
 
Intro to Flutter SDK
digitaljoni
 
Building Kick Ass Video Games for the Cloud
Chris Schalk
 
What’s new in android o
Ahmed Nabil
 
Ignite your app development with Angular, NativeScript and Firebase
Jen Looper
 
From React to React Native - Things I wish I knew when I started
sparkfabrik
 
How to Create Your First Android App Step by Step.pdf
BOSC Tech Labs
 
Ad

Recently uploaded (20)

PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Presentation about variables and constant.pptx
safalsingh810
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 

Introduction to React Native