SlideShare a Scribd company logo
MOBILE DEVELOPMENT - REACT NATIVE WORKSHOP WITH ARYA
BERLIN, APRIL 16, 2016
// WHY REACT NATIVE? //
1. Developers can utilise the same concepts as on the Web i.e. reason about
UI in the same way and code in JS - “learn once” philosophy.
2. Faster development workflow with quick reload (cmd+r) or live update
(watchman)
3. Bypass the App Store for UI changes (e.g. apphub.io, codepush.tools).
4. Cross-platform for Android/iOS - “learn once” again ;)
// TOOLCHAIN //
npm - dependency manager for javascript
babel - syntax transformation to use modern JS features and JSX
packager - builds the project ready for use on a device
JSX - template language for react native (basically just syntactic sugar)
Xcode/Android SDK - standard native build tools
In addition a dev target such as Xcode Simulator, Android Emulator, or an
actual device.
// REACT OVERVIEW //
Components
View as a function of the data
JSX, some syntactic sugar
Virtual DOM
One-way data flow
// COMPONENTS //
CommentForm
CommentList
Encapsulate UI
Composable
Reusable
CommentBox
// DATA => VIEW //
state	=	{	
		isLoading:	true,	
		data:	null,	
}
// DATA => VIEW //
state	=	{	
		isLoading:	false,	
		data:	[...],	
}
// JSX //
class	CommentList	extends	Component	{	
		render()	{	
				return	<ul	className="commentList">	
						{	
								this.props.comments.map(comment	=>		
										<Comment	
												author={comment.author}	
												text={comment.text}	
										/>)	
						}	
				</ul>;	
		}	
}	
Component
JS code
Composition
// VIRTUAL DOM //
<ul	className="commentList">	
		<li	className="comment">John:	Hello	Berlin</li>	
		<li	className="comment">Mary:	Love	this	place</li>	
</ul>
// VIRTUAL DOM //
<ul	className="commentList">	
		<li	className="comment">John:	Hello	Berlin</li>	
		<li	className="comment">Mary:	Love	this	place</li>	
</ul>	
<ul	className="commentList">	
		<li	className="comment">John:	Hello	Berlin</li>	
		<li	className="comment">Mary:	Love	this	place</li>	
		<li	className="comment">Jane:	Great	people</li>	
</ul>	
Efficient Diffing
Re-render on any
// PROPS AND STATE //
class	Comment	extends	Component	{	
		...	
		handleClick()	{	
				this.setState({	isRead:	true	});	
		}	
		render()	{	
				let	commentClassName	=	this.state.isRead	?		
						"comment"	:	"comment	comment-unread";	
				return	<li		
						className={commentClassName}	
						onClick={this.handleClick.bind(this)}	
				>	
						{this.props.author}:	{this.props.text}	
				</li>;	
		}	
}	
Props: immutable
State: mutable
Callbacks as props
// UNIDIRECTIONAL DATA FLOW //
CommentList
<ul>
Comment Comment Comment
<li> <li> <li>
Data
// UNIDIRECTIONAL DATA FLOW //
CommentList
<ul>
Comment Comment Comment
<li> <li> <li>
Callbacks
(passed in by
props)
// REACT NATIVE //
Different components
React React Native
div View
p Text
img Image
a Touchable
ul
ListView
// REACT NATIVE //
Layouting in JS
No CSS, but similar StyleSheets
Flexbox-support
height: 40
flex: 1
height: 40
// REACT NATIVE //
Native components
MapView
DatePickerIOS
ToolbarAndroid
Native APIs
Geolocation
Push notifications
Vibration
ActionSheet
Extensible
Custom native modules
NPM is your friend ;-)
ABOUT THE ARYA CHALLENGES
React-Native-N3XTCODER-Arya-Workshop-April-2016
// OUR STARTER APP //
We prepared a project to provide a starting point with the basic Arya look and
feel.
https://github.com/n3xtcoder/react-native-starter
>> Walk through the code
By the end of the coffee break:
Run the project on at least 1 device.
Open the project root in your favourite IDE/JS editor.
// CHALLENGE 1: ARYA MOOD TRACKER //
Hit “+” to add an entry
User can define their mood right now
Store the entry to synchronise later
Challenge:
Implement the Mood Tracker.
Capture plaintext, dropdown, or data from a rich UI (e.g. slider).
Store the information in AsyncStorage.
>> Helpful links:
https://facebook.github.io/react-native/
https://github.com/jeanregisser/react-native-slider
// CHALLENGE 2: HERO FEATURE //
Data from sensors is collected
For the purpose of the workshop we will display it in realtime to the user
As extra bonus, store it for later analysis
Example 1 - live geolocation:
Show the user’s position on a map (iOS this is built in)
Example 2 - accelerometer:
Display the accelerometer value in real-time
Build a barchart or other UI component
// USEFUL MODULES //
react-native-sensor-manager – Sensor Data for Android
react-native-motion-manager – Sensor Data for iOS
react-native-chart – Charts
react-native-maps – Advanced maps (iOS and Android)
Directory: https://js.coach/react-native
Ad

More Related Content

What's hot (20)

Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
snevesbarros
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
Syam Sasi
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
Andy Scherzinger
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
robgalvinjr
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
Pratik Patel
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
Sauce Labs
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fast
Bartosz Kosarzycki
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
ejlp12
 
Java presentation
Java presentation Java presentation
Java presentation
Programming Talents
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK
Marcel Gehlen
 
Java presentation
Java presentationJava presentation
Java presentation
surajdmk
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
Craig Dunn
 
Talk (2)
Talk (2)Talk (2)
Talk (2)
suraj sakhardande
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
 
Appium ppt
Appium pptAppium ppt
Appium ppt
natashasweety7
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 
Applico Android Info Session at Columbia University
Applico Android Info Session at Columbia UniversityApplico Android Info Session at Columbia University
Applico Android Info Session at Columbia University
Applico
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
snevesbarros
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
Syam Sasi
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
Andy Scherzinger
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
robgalvinjr
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
Pratik Patel
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
Sauce Labs
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fast
Bartosz Kosarzycki
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
ejlp12
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK
Marcel Gehlen
 
Java presentation
Java presentationJava presentation
Java presentation
surajdmk
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
Craig Dunn
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 
Applico Android Info Session at Columbia University
Applico Android Info Session at Columbia UniversityApplico Android Info Session at Columbia University
Applico Android Info Session at Columbia University
Applico
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 

Similar to React-Native-N3XTCODER-Arya-Workshop-April-2016 (20)

Lecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptxLecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptx
GevitaChinnaiah
 
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
UA Mobile
 
React Native
React NativeReact Native
React Native
Craig Jolicoeur
 
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel Puterman
Applitools
 
React native
React nativeReact native
React native
Mohammed El Rafie Tarabay
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
lancelotlaytan1996
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 
Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016
Adrian Philipp
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
Matteo Manchi
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
Christoffer Noring
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
Hussain Behestee
 
Top Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle ThemTop Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle Them
Ionic Framework
 
React Native
React NativeReact Native
React Native
Heber Silva
 
Enterprise Hybrid Feasibility Analysis
Enterprise Hybrid Feasibility AnalysisEnterprise Hybrid Feasibility Analysis
Enterprise Hybrid Feasibility Analysis
Lawrence Nyakiso
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
Barak Cohen
 
User Interface
User InterfaceUser Interface
User Interface
Nikunj Pansuriya
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
Deploy your app with one Slack command
Deploy your app with one Slack commandDeploy your app with one Slack command
Deploy your app with one Slack command
Fabio Milano
 
Lecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptxLecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptx
GevitaChinnaiah
 
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
UA Mobile
 
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel Puterman
Applitools
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
lancelotlaytan1996
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 
Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016
Adrian Philipp
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
Matteo Manchi
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
Top Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle ThemTop Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle Them
Ionic Framework
 
Enterprise Hybrid Feasibility Analysis
Enterprise Hybrid Feasibility AnalysisEnterprise Hybrid Feasibility Analysis
Enterprise Hybrid Feasibility Analysis
Lawrence Nyakiso
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
Barak Cohen
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
Deploy your app with one Slack command
Deploy your app with one Slack commandDeploy your app with one Slack command
Deploy your app with one Slack command
Fabio Milano
 
Ad

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Ad

React-Native-N3XTCODER-Arya-Workshop-April-2016

  • 1. MOBILE DEVELOPMENT - REACT NATIVE WORKSHOP WITH ARYA BERLIN, APRIL 16, 2016
  • 2. // WHY REACT NATIVE? // 1. Developers can utilise the same concepts as on the Web i.e. reason about UI in the same way and code in JS - “learn once” philosophy. 2. Faster development workflow with quick reload (cmd+r) or live update (watchman) 3. Bypass the App Store for UI changes (e.g. apphub.io, codepush.tools). 4. Cross-platform for Android/iOS - “learn once” again ;)
  • 3. // TOOLCHAIN // npm - dependency manager for javascript babel - syntax transformation to use modern JS features and JSX packager - builds the project ready for use on a device JSX - template language for react native (basically just syntactic sugar) Xcode/Android SDK - standard native build tools In addition a dev target such as Xcode Simulator, Android Emulator, or an actual device.
  • 4. // REACT OVERVIEW // Components View as a function of the data JSX, some syntactic sugar Virtual DOM One-way data flow
  • 5. // COMPONENTS // CommentForm CommentList Encapsulate UI Composable Reusable CommentBox
  • 6. // DATA => VIEW // state = { isLoading: true, data: null, }
  • 7. // DATA => VIEW // state = { isLoading: false, data: [...], }
  • 9. // VIRTUAL DOM // <ul className="commentList"> <li className="comment">John: Hello Berlin</li> <li className="comment">Mary: Love this place</li> </ul>
  • 10. // VIRTUAL DOM // <ul className="commentList"> <li className="comment">John: Hello Berlin</li> <li className="comment">Mary: Love this place</li> </ul> <ul className="commentList"> <li className="comment">John: Hello Berlin</li> <li className="comment">Mary: Love this place</li> <li className="comment">Jane: Great people</li> </ul> Efficient Diffing Re-render on any
  • 11. // PROPS AND STATE // class Comment extends Component { ... handleClick() { this.setState({ isRead: true }); } render() { let commentClassName = this.state.isRead ? "comment" : "comment comment-unread"; return <li className={commentClassName} onClick={this.handleClick.bind(this)} > {this.props.author}: {this.props.text} </li>; } } Props: immutable State: mutable Callbacks as props
  • 12. // UNIDIRECTIONAL DATA FLOW // CommentList <ul> Comment Comment Comment <li> <li> <li> Data
  • 13. // UNIDIRECTIONAL DATA FLOW // CommentList <ul> Comment Comment Comment <li> <li> <li> Callbacks (passed in by props)
  • 14. // REACT NATIVE // Different components React React Native div View p Text img Image a Touchable ul ListView
  • 15. // REACT NATIVE // Layouting in JS No CSS, but similar StyleSheets Flexbox-support height: 40 flex: 1 height: 40
  • 16. // REACT NATIVE // Native components MapView DatePickerIOS ToolbarAndroid Native APIs Geolocation Push notifications Vibration ActionSheet Extensible Custom native modules NPM is your friend ;-)
  • 17. ABOUT THE ARYA CHALLENGES
  • 19. // OUR STARTER APP // We prepared a project to provide a starting point with the basic Arya look and feel. https://github.com/n3xtcoder/react-native-starter >> Walk through the code By the end of the coffee break: Run the project on at least 1 device. Open the project root in your favourite IDE/JS editor.
  • 20. // CHALLENGE 1: ARYA MOOD TRACKER // Hit “+” to add an entry User can define their mood right now Store the entry to synchronise later Challenge: Implement the Mood Tracker. Capture plaintext, dropdown, or data from a rich UI (e.g. slider). Store the information in AsyncStorage. >> Helpful links: https://facebook.github.io/react-native/ https://github.com/jeanregisser/react-native-slider
  • 21. // CHALLENGE 2: HERO FEATURE // Data from sensors is collected For the purpose of the workshop we will display it in realtime to the user As extra bonus, store it for later analysis Example 1 - live geolocation: Show the user’s position on a map (iOS this is built in) Example 2 - accelerometer: Display the accelerometer value in real-time Build a barchart or other UI component
  • 22. // USEFUL MODULES // react-native-sensor-manager – Sensor Data for Android react-native-motion-manager – Sensor Data for iOS react-native-chart – Charts react-native-maps – Advanced maps (iOS and Android) Directory: https://js.coach/react-native