SlideShare a Scribd company logo
@matteomanchi
Matteo Manchi
ROME 10-11 NOVEMBER 2017
React Native for multi-platform
mobile applications
1
@matteomanchi
If you want to participate actively with this talk,
please install Expo app on your smartphone.
2
Attention
@matteomanchi
Mobile Development
3
@matteomanchi 4
Mobile Development
Native is hard…
@matteomanchi 5
Different platforms
@matteomanchi 6
Different languages
@matteomanchi 7
Different look
@matteomanchi
… but necessary.
8
Mobile Development
Native is hard…
@matteomanchi
Matteo Manchi
} CEO at Impronta Advance
} Full stack developer
} React enthusiast
} Co-founder of RomaJS
} Maintainer of italia/design-react
} @matteomanchi
} https://github.com/takeno
9
About Me
@matteomanchi
Web Developer
My journey to app development
10
⬇
Mobile site version
⬇
Mobile application ➡➡ WTF?
@matteomanchi
Phone Gap with box-shadow
11
@matteomanchi
Web Developer
My journey to app development
12
⬇
Mobile site version
⬇
Mobile application ➡
⬇
⬅⬅
@matteomanchi
Titanium - Red Screen of Death
13
@matteomanchi
Front-end experience
14
@matteomanchi
React is a JavaScript library
for building user interfaces
developed by Facebook.
It allows you to define your UI using Components, which are
reusable, and it helps UI updates through Declarative UI.
All this overhead is minimized by Virtual DOM.
15
What is React?
@matteomanchi
■ Component: Everything is a component
■ Props: some data passed to child component
■ State: some internal data of a component
■ JSX: XML-like syntax helps to define component's
structure
■ Virtual DOM: tree of custom objects representing a port
of the DOM
16
Some keywords
@matteomanchi
Component definition
17
class Hello extends React.Component {
render() {
return <div>Hello {this.props.name}</div>;
}
}
ReactDOM.render(
<Hello name="Milan" />,
document.getElementById('container')
);
@matteomanchi
A framework for building native apps using React.
18
React Native
Yeah, the same React of web developers
Learn once, write anywhere.
@matteomanchi
■ Summer 2013: React Native started as project in
Facebook’s internal hackaton
■ January 2015: During the React.js-conf, React Native
first public demo was shown
■ March 2015: React Native has been published as open
source project.
A brief history of React Native
19
@matteomanchi
Codemotion 2015
https://facebook.github.io/react/blog/2015/03/26/introducing-react-native.html 20
@matteomanchi
■ Summer 2013: React Native started as project in
Facebook’s internal hackaton
■ January 2015: During the React.js-conf, React Native
first public demo was shown
■ March 2015: React Native has been published as open
source project.
■ May 2016: search terms of React Native surpassed iOS
and Android development, according to Google Trends
A brief history of React Native
21
@matteomanchi
Component definition
22
@matteomanchi
Demo time!
23
@matteomanchi
■ npm install -g create-react-native-app
■ create-react-native-app MyNativeApp
■ cd MyNativeApp
■ npm start
■ Install Expo app for Android and iOS
■ Connect your device
24
Getting started
@matteomanchi
■ React-native-based company in Palo Alto
■ Huge contribution to React Native
■ Maintainers of create-react-native-app
■ Expo SDK
■ XDE
■ snack.expo.io
Expo
25
@matteomanchi 26
How it works
Native Bridge
Your code
JavaScript Core
bundle.js
Native View
render
@matteomanchi
React renders your entire app as a plain object, totally
decoupled from DOM. On every change, it performs the diff
of previous object tree with the new one. Then it change
only the partial DOM which is mutated.
27
Virtual DOM
<div>
Hello {this.props.name}
</div>
Js-plain version
JSX
Transpiler
Object Tree
react
engine
DOM
react-dom
engine
@matteomanchi
JSX: <div>Hello {this.props.name}</div>
JS: React.createElement("div", null,
"Hello ", this.props.name);
Object:
DOM:
28
Virtual DOM
@matteomanchi 29
From Virtual DOM to Native
<Text>
Hello {this.props.name}
</Text>
Js-plain version
JSX
Transpiler
Object Tree
react
engine
Native
react-native
engine
@matteomanchi 30
About multi-platform
Business logic in JavaScript
means same codebase
between platforms.
@matteomanchi
JSCore allows you to use your favorite
JavaScript modules and tools!
31
JS Ecosystem
@matteomanchi
Style
32
■ CSS-like declarations with camel-case properties
■ style props defined for all native components
■ It can be an array of styles
■ StyleSheet module to create multiple classes in one place
and cache them
It supports Flexbox!
@matteomanchi
React Native wraps native UI components
33
Out-of-the-box
■ TabBar
■ Text
■ TextInput
■ Touchable
■ TouchableOpacity
■ Touchable Highlight
■ Touchable WithoutFeedback
■ View
■ WebView
■ Activity Indicator
■ Date Picker
■ Image
■ ListView
■ MapView
■ Navigator
■ Picker
■ ScrollView
■ Slider
@matteomanchi 34
Out-of-the-box
■ InteractionManager
■ Keyboard
■ LayoutAnimation
■ Linking
■ NetInfo
■ PanResponder
■ PixelRatio
■ Settings
■ Share
■ StatusBar
■ TimePickerAndroid
■ ToastAndroid
■ Vibration
■ ActionSheetIOS
■ Alert
■ Animated
■ AppState
■ AsyncStorage
■ BackAndroid
■ CameraRoll
■ Clipboard
■ DatePickerAndroid
■ Dimensions
■ Easing
■ Geolocation
■ ImageEditor
React Native wraps native API
@matteomanchi 35
Out-of-the-box
■ GeoLocation
■ Timers
● setTimeout
● setInterval
■ Flexbox
■ Network
● XMLHttpRequest
● Fetch
React Native injects polyfills in JS Core
@matteomanchi
React Native have useful tools to improve your
development experience.
How to show Dev Menu?
■ Shaking your device
■ Cmd + D on iOS Simulator
■ F2 on android emulator
36
Developer Tools
@matteomanchi
It reloads the js code, so you
can see changes without
recompile the entire app.
■ Cmd + R on iOS Simulator
■ Type r twice on android
emulator
37
Developer Tools - Reload
@matteomanchi
You can speed up your development times by having your
app reload automatically any time your code changes.
To do this, enable Live Reload from dev menu.
38
Developer Tools - Live Reload
@matteomanchi
You may even go a step further and keep your app running as new versions of
your files are injected into the JavaScript bundle automatically by enabling Hot
Reloading from the Developer Menu. This will allow you to persist the app's state
through reloads.
39
Developer Tools - Hot Reloading
@matteomanchi
With Element Inspector you
can inspect elements and get
their styles.
40
Developer Tools - Element Inspector
@matteomanchi
In-app errors are displayed in a full screen alert with a red background inside your
app. This screen is known as a RedBox.
Instead, warnings will be displayed on screen with a yellow background. These
alerts are known as YellowBoxes.
41
Developer Tools - Yellow and Red boxes
@matteomanchi
You can inspect native views as you do with browser inspector.
Install react-dev-tool to connect automatically to your app.
42
Developer Tools - React Dev Tools
@matteomanchi
Demo time!
43
@matteomanchi
Create React Native App hides native projects folder and
uses Expo app to let you work on your own app without
need to build.
■ Like in create-react-app, eject is the process of setting up
your own custom build for your app.
■ When I need to do it?
■ I want to include external native libraries
■ I want to write my custom native module
■ I want to publish my app to Stores.
You can back to standard setup any time with:
npm run eject
This process is not reversible.
Back to native projects
44
@matteomanchi
■ brew install node
■ brew install watchman
■ npm install -g react-native-cli
■ Install XCode and/or Android SDK
■ react-native init SampleApp
■ cd SampleApp
■ react-native run-ios
■ react-native run-android
Back to native projects
45
@matteomanchi
React Native’s community is very active
■ 55k+ stars on Github
■ 9800+ issue solved
■ React Native Community on Github
46
React Native Ecosystem
@matteomanchi 47
React Native Ecosystem
■ UI Components
● native-base
● react-native-elements
● react-native-material-kit
● react-native-material-design
■ Navigation
● react-native-router-flux
● react-navigation
● native-navigation by AirBnB
● wix/react-native-navigation
Hundreds of packages published:
■ Native API
● react-native-maps by AirBnB
● react-native-camera
● react-native-onesignal
● code-push by Microsoft
@matteomanchi
Facebook Ads Manager
48
Where is used React Native?
85% shared code between platforms
https://code.facebook.com/.../react-native-how-we-built-the-first-cross-platform
@matteomanchi 49
Where is used React Native?
Facebook App
FB event section is in RN
http://goo.gl/ziBzOl
@matteomanchi 50
Who is using React Native?
Facebook Facebook
Ads Manager
Instagram AirBnB
Skype Tesla Wallmart Discord
@matteomanchi
What’s next?
51http://githubstats.com/facebook/react-native
Stars Forks
Pull Requests Issues
React Native’s community is very active
@matteomanchi
“We use the
exact same version
internally”
Tadeu Zagallo
Software Engineer at Facebook
What’s next?
52http://goo.gl/ziBzOl
@matteomanchi
Woah! Woah!
53
Questions?
@matteomanchi
ROME 10-11 NOVEMBER 2017
THANK YOU!
@matteomanchi
54

More Related Content

PPTX
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
PDF
Introduzione a React Native - Facebook Developer Circle Rome
PDF
From zero to hero with React Native!
PDF
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
PDF
A tour of React Native
PPTX
Creating books app with react native
PDF
Lo mejor y peor de React Native @ValenciaJS
PDF
Intro to react native
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Introduzione a React Native - Facebook Developer Circle Rome
From zero to hero with React Native!
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
A tour of React Native
Creating books app with react native
Lo mejor y peor de React Native @ValenciaJS
Intro to react native

What's hot (20)

PDF
Experiences building apps with React Native @DomCode 2016
PDF
Optimizing React Native views for pre-animation
PDF
React native in the wild @ Codemotion 2016 in Rome
PDF
React native first impression
PDF
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
PDF
Philip Shurpik "Architecting React Native app"
PPTX
Introduction to React Native
PPTX
React Native
PDF
Getting Started with React Native (and should I use it at all?)
PDF
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
PPTX
Nativescript with angular 2
PDF
React Native in a nutshell
PDF
React native
PDF
The Gist of React Native
PDF
Putting the Native in React Native - React Native Boston
PDF
React Native +Redux + ES6 (Updated)
PDF
What's This React Native Thing I Keep Hearing About?
PDF
learning react
PDF
How to React Native
PDF
A Closer Look At React Native
Experiences building apps with React Native @DomCode 2016
Optimizing React Native views for pre-animation
React native in the wild @ Codemotion 2016 in Rome
React native first impression
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
Philip Shurpik "Architecting React Native app"
Introduction to React Native
React Native
Getting Started with React Native (and should I use it at all?)
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
Nativescript with angular 2
React Native in a nutshell
React native
The Gist of React Native
Putting the Native in React Native - React Native Boston
React Native +Redux + ES6 (Updated)
What's This React Native Thing I Keep Hearing About?
learning react
How to React Native
A Closer Look At React Native
Ad

Viewers also liked (20)

PDF
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
PPTX
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
PDF
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
PDF
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
PDF
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
PDF
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
PDF
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
PDF
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
PDF
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
PDF
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
PPTX
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
PDF
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
PPTX
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
PDF
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
PDF
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
PDF
Erik Wendel - Beyond JavaScript Frameworks: Writing Reliable Web Apps With El...
PDF
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
PPSX
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
PDF
Cutting the Fat
PDF
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
Erik Wendel - Beyond JavaScript Frameworks: Writing Reliable Web Apps With El...
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Cutting the Fat
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Ad

Similar to Matteo Manchi - React Native for multi-platform mobile applications - Codemotion Milan 2017 (20)

PDF
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
PDF
PDF
Code Once; Run Everywhere - A Beginner’s Journey with React Native
PPTX
Introduction to react native @ TIC NUST
PPTX
React native
PPTX
React Native - Build Native Mobile App
PDF
This is the Ultimate Guide to React Native App Development.pdf
ODP
Hot Reloading with React - Experiences
PDF
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
PPTX
DevOps for Hackathons: DevOps without the Ops
ODP
Build and Deploy a Python Web App to Amazon in 30 Mins
PDF
Introduction to React Native & Rendering Charts / Graphs
PDF
Front matter: Next Level Front End Deployments on OpenShift
PPTX
Reactjs workshop
PDF
When to choose and avoid react native for mobile app development
PDF
Developing, building, testing and deploying react native apps
PPTX
Dublin Unity User Group Meetup Sept 2015
PDF
Jose l ugia 6 wunderkinder, momenta
PDF
Nimble - Reddit Feed React native
PDF
Xamarin for (not only) Android developers
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Introduction to react native @ TIC NUST
React native
React Native - Build Native Mobile App
This is the Ultimate Guide to React Native App Development.pdf
Hot Reloading with React - Experiences
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
DevOps for Hackathons: DevOps without the Ops
Build and Deploy a Python Web App to Amazon in 30 Mins
Introduction to React Native & Rendering Charts / Graphs
Front matter: Next Level Front End Deployments on OpenShift
Reactjs workshop
When to choose and avoid react native for mobile app development
Developing, building, testing and deploying react native apps
Dublin Unity User Group Meetup Sept 2015
Jose l ugia 6 wunderkinder, momenta
Nimble - Reddit Feed React native
Xamarin for (not only) Android developers

More from Codemotion (20)

PDF
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
PDF
Pompili - From hero to_zero: The FatalNoise neverending story
PPTX
Pastore - Commodore 65 - La storia
PPTX
Pennisi - Essere Richard Altwasser
PPTX
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
PPTX
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
PPTX
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
PPTX
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
PDF
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
PDF
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
PDF
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
PDF
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
PDF
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
PDF
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
PPTX
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
PDF
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
PDF
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
PDF
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
PDF
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Pompili - From hero to_zero: The FatalNoise neverending story
Pastore - Commodore 65 - La storia
Pennisi - Essere Richard Altwasser
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPT
Teaching material agriculture food technology
PDF
Advanced IT Governance
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Modernizing your data center with Dell and AMD
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
GamePlan Trading System Review: Professional Trader's Honest Take
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced Soft Computing BINUS July 2025.pdf
Teaching material agriculture food technology
Advanced IT Governance
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Cloud computing and distributed systems.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Modernizing your data center with Dell and AMD
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....

Matteo Manchi - React Native for multi-platform mobile applications - Codemotion Milan 2017