SlideShare a Scribd company logo
1 of 23
Download to read offline
PRAVEEN PRASAD
CLEVERO INC.
AN INTRODUCTION TO
REACT NATIVE
CLEVERO ENGINEERING
OCT 2018
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
ROADMAP
▸ What, Why ?
▸ React and React Native
▸ Who?
▸ Alternatives?
▸ How to start?
▸ Simple Todo APP
▸ Opinion
▸ Further reading
▸ Questions
2
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
WHAT IS REACT NATIVE?
▸ An open source, cross-platform framework for building
native mobile apps with Javascript and React, letting
you compose a rich mobile UI from declarative
components.
3
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
WHAT IS REACT NATIVE?
▸ An open source, cross-platform framework for building
native mobile apps with Javascript and React, letting
you compose a rich mobile UI from declarative
components.
▸ You don't build a "mobile web app", an "HTML5 app", or a
"hybrid app". You build a real mobile app that's
indistinguishable from an app built using Objective-C or
Java.
4
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
WHAT IS REACT NATIVE?
▸ An open source, cross-platform framework for building
native mobile apps with Javascript and React, letting you
compose a rich mobile UI from declarative components.
▸ You don't build a "mobile web app", an "HTML5 app", or a
"hybrid app". You build a real mobile app that's
indistinguishable from an app built using Objective-C or Java.
▸ Uses the same fundamental UI building blocks as regular
iOS and Android apps. You just put those building blocks
together using JavaScript and React.
▸ Built by Facebook
5
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
WHY?
▸ Javascript is easy to learn
▸ Learn once write anywhere. No need to learn objective-c,
swift or java separately
▸ Build real native mobile apps
▸ Fast feedback cycle with hot reloading. No need to wait for
recompiling
▸ Code sharing between platforms helps reduce
development cost
6
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
TRIVIA
▸ People have achieved up to 80% of code sharing between
platforms
7
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
REACT COMPONENTS (REACT AND REACT NATIVE )
8
In react, UI is function of state and props
REACT
COMPONENT
properties,
state
Your react component decide how it should look based on props and states
and spits out a description of the UI. You don’t touch the webpage. This thing
makes possible for us to have react-native
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
REACT / REACT NATIVE COMPONENT (REACT AND REACT NATIVE )
9
REACT JS
BROWSER
DOM
REACT
NATIVE
IOS
class Hello extends Component {
render() {
return (<div>Hello</div>
)
}
}
ANDROID
SOMEWHERE
ELSE
class Hello extends Component {
render() {
return (<View>
<Text>Hello</Text>
</View>
)
}
}
React Component
React Native Component
Bridges
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
BROWSER VS DOM (REACT AND REACT NATIVE )
▸ <div>
▸ <img>
▸ <span>, <p>
▸ <ul>,<ol>
▸ <button>
10
▸ <View>
▸ <Image>
▸ <Text>
▸ <FlatList>, <SectionList>
▸ <Button>,
<TouchableHighlight>…
THEY WILL INVOKE REAL PLATFORM API
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
STYLING (REACT AND REACT NATIVE )
11
<div style={{
color:'red',
fontSize:24
}}>
Hello
</div>
<View>
<Text style={{
color:'blue',
fontSize:14
}}>
Hello
</Text>
</View>
React Component
React Native Component
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'red',
width: '100%'
},
});
<View style={styles.container}>
</View>
React Native Component (recommended way)
What is Stylesheet and why?
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
STYLE SHEET (REACT AND REACT NATIVE )
12
const styles = StyleSheet.create({
container: {
borderRadius: 4,
borderWidth: 0.5,
borderColor: '#d6d7da',
}
});
▸ Style will be referred by ID
instead of creating a new style
object every time, hence
optimized
▸ All styles are send once through
the bridge. All subsequent uses
are going to refer an id (not
implemented yet).
A StyleSheet is an abstraction similar to CSS StyleSheets
Learn flexbox and your life will be lot easier
All css props are not
available in React Native
Unlike web browser Flexbox has default direct of column
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
USING OPEN SOURCE LIBRARIES/COMPONENTS (REACT AND REACT NATIVE )
Pure javascript/react-native libraries will work as expected
13
Installing a package
> yarn add axios
> yarn add lodash
> yarn add redux
> yarn add something_else
Using a package
import _ from ‘lodash’
import axios from ’axios’
let result = await axios({url:’xyz.com’})
result = result.map(something)
….. and so on as expected
for some libraries yo might have to run
react-native link to link native dependencies
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
WHO IS USING? 14
Famous apps built with react native
• Walmart
• Airbnb (stopped using)
• Bloomberg
• Sound Cloud
• Wix
• Tesla
• Uber Eats
• Palantir
………
Myntra
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
ALTERNATIVES?
▸ Ionic
▸ Nativescript
15
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
HOW TO START
1. MacOS is required to build iOS apps
2. Install nodejs
3. Install react native: npm install -g react-native-cli (yarn global add
react-native-cli)
4. Install xcode (for IOS), Java8 or newer and android SDK (for Android)
5. Create new app: react-native init <project_name> (eg: react-native
init MyCoolApp1)
6. Goto app: cd <project_name>
7.Start app: react-native run-ios / react-native run-android (start app)
16
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
SIMPLE TODO APP 17
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
BOX DESIGN OF APP 18
TEXTBOX
BUTTON
<View />
<TouchableHighlight />
<Text />
TEXT
TEXT
TEXT
Flexbox is your friend
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
OPIONION
▸ We at Clevero should heavily invest in React Native
▸ We should even build our staticphone app using React
Native
19
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
FURTHER READING
▸ How to run app on local device
▸ How to make network request
▸ How to create native module
▸ How to store data on device
▸ How to debug
▸ How to handle gesture and other device capabilities
▸ How to integrate with an existing application
▸ How publish your app
20
PRAVEEN PRASAD. CLEVERO INC. OCT 2018
USEFUL LINKS
▸ Slide link
▸ GitHub link
21
QUESTIONS?
THANKS
Praveen Prasad
Clevero Inc.

More Related Content

What's hot

Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Matt Raible
 
Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Matt Raible
 
Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018Matt Raible
 
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017Matt Raible
 
CocoaHeads Paris iBeacon par Clément Sauvage
CocoaHeads Paris iBeacon par Clément SauvageCocoaHeads Paris iBeacon par Clément Sauvage
CocoaHeads Paris iBeacon par Clément SauvageCocoaHeads France
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Matt Raible
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Matt Raible
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
 
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018Matt Raible
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Matt Raible
 
Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017Matt Raible
 
Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Matt Raible
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Matt Raible
 
Bootiful Development with Spring Boot and React - GIDS 2019
Bootiful Development with Spring Boot and React - GIDS 2019Bootiful Development with Spring Boot and React - GIDS 2019
Bootiful Development with Spring Boot and React - GIDS 2019Matt Raible
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Matt Raible
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017Matt Raible
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best PracticesFatih Acet
 

What's hot (20)

Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017Bootiful Development with Spring Boot and React - SpringOne 2017
Bootiful Development with Spring Boot and React - SpringOne 2017
 
Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018
 
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
 
CocoaHeads Paris iBeacon par Clément Sauvage
CocoaHeads Paris iBeacon par Clément SauvageCocoaHeads Paris iBeacon par Clément Sauvage
CocoaHeads Paris iBeacon par Clément Sauvage
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017
 
Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018Bootiful Development with Spring Boot and Angular - RWX 2018
Bootiful Development with Spring Boot and Angular - RWX 2018
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
 
Bootiful Development with Spring Boot and React - GIDS 2019
Bootiful Development with Spring Boot and React - GIDS 2019Bootiful Development with Spring Boot and React - GIDS 2019
Bootiful Development with Spring Boot and React - GIDS 2019
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best Practices
 

Similar to React native.key

ReactJS Vs React Native with 10 Significant Differences
ReactJS Vs React Native with 10 Significant DifferencesReactJS Vs React Native with 10 Significant Differences
ReactJS Vs React Native with 10 Significant DifferencesWindzoon Technologies
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.Techugo
 
How React Native has changed Web and Mobile Application Development, Engineer...
How React Native has changed Web and Mobile Application Development, Engineer...How React Native has changed Web and Mobile Application Development, Engineer...
How React Native has changed Web and Mobile Application Development, Engineer...engineermaste solution
 
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.pptxGevitaChinnaiah
 
The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022Katy Slemon
 
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"Lviv Startup Club
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React NativeTadeu Zagallo
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSDaine Mawer
 
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, DisadvantagesReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, DisadvantagesTechtic Solutions
 
Hiring React Native Developers: A Comprehensive Guide
Hiring React Native Developers: A Comprehensive GuideHiring React Native Developers: A Comprehensive Guide
Hiring React Native Developers: A Comprehensive GuideAmiDas2
 
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And DisadvantagesReactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And DisadvantagesAndolasoft Inc
 
Getting Started With React Native Presntation
Getting Started With React Native PresntationGetting Started With React Native Presntation
Getting Started With React Native PresntationKnoldus Inc.
 
React Native - Build Native Mobile App
React Native - Build Native Mobile AppReact Native - Build Native Mobile App
React Native - Build Native Mobile AppMobio Solutions
 
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...Katy Slemon
 
Rits Brown Bag - React Native and Salesforce
Rits Brown Bag - React Native and SalesforceRits Brown Bag - React Native and Salesforce
Rits Brown Bag - React Native and SalesforceRight IT Services
 
Top React Native Interview Questions and Answers in 2023
Top React Native Interview Questions and Answers in 2023Top React Native Interview Questions and Answers in 2023
Top React Native Interview Questions and Answers in 2023Instaily Academy
 

Similar to React native.key (20)

React Native
React NativeReact Native
React Native
 
ReactJS Vs React Native with 10 Significant Differences
ReactJS Vs React Native with 10 Significant DifferencesReactJS Vs React Native with 10 Significant Differences
ReactJS Vs React Native with 10 Significant Differences
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.
 
How React Native has changed Web and Mobile Application Development, Engineer...
How React Native has changed Web and Mobile Application Development, Engineer...How React Native has changed Web and Mobile Application Development, Engineer...
How React Native has changed Web and Mobile Application Development, Engineer...
 
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
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022
 
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, DisadvantagesReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
 
Hiring React Native Developers: A Comprehensive Guide
Hiring React Native Developers: A Comprehensive GuideHiring React Native Developers: A Comprehensive Guide
Hiring React Native Developers: A Comprehensive Guide
 
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And DisadvantagesReactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
 
Getting Started With React Native Presntation
Getting Started With React Native PresntationGetting Started With React Native Presntation
Getting Started With React Native Presntation
 
React Native - Build Native Mobile App
React Native - Build Native Mobile AppReact Native - Build Native Mobile App
React Native - Build Native Mobile App
 
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...
React Native Adoption at Bacancy Technology: The Journey from Beginners to Be...
 
Rits Brown Bag - React Native and Salesforce
Rits Brown Bag - React Native and SalesforceRits Brown Bag - React Native and Salesforce
Rits Brown Bag - React Native and Salesforce
 
React vs React Native
React vs React NativeReact vs React Native
React vs React Native
 
Top React Native Interview Questions and Answers in 2023
Top React Native Interview Questions and Answers in 2023Top React Native Interview Questions and Answers in 2023
Top React Native Interview Questions and Answers in 2023
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

React native.key

  • 1. PRAVEEN PRASAD CLEVERO INC. AN INTRODUCTION TO REACT NATIVE CLEVERO ENGINEERING OCT 2018
  • 2. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 ROADMAP ▸ What, Why ? ▸ React and React Native ▸ Who? ▸ Alternatives? ▸ How to start? ▸ Simple Todo APP ▸ Opinion ▸ Further reading ▸ Questions 2
  • 3. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 WHAT IS REACT NATIVE? ▸ An open source, cross-platform framework for building native mobile apps with Javascript and React, letting you compose a rich mobile UI from declarative components. 3
  • 4. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 WHAT IS REACT NATIVE? ▸ An open source, cross-platform framework for building native mobile apps with Javascript and React, letting you compose a rich mobile UI from declarative components. ▸ You don't build a "mobile web app", an "HTML5 app", or a "hybrid app". You build a real mobile app that's indistinguishable from an app built using Objective-C or Java. 4
  • 5. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 WHAT IS REACT NATIVE? ▸ An open source, cross-platform framework for building native mobile apps with Javascript and React, letting you compose a rich mobile UI from declarative components. ▸ You don't build a "mobile web app", an "HTML5 app", or a "hybrid app". You build a real mobile app that's indistinguishable from an app built using Objective-C or Java. ▸ Uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks together using JavaScript and React. ▸ Built by Facebook 5
  • 6. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 WHY? ▸ Javascript is easy to learn ▸ Learn once write anywhere. No need to learn objective-c, swift or java separately ▸ Build real native mobile apps ▸ Fast feedback cycle with hot reloading. No need to wait for recompiling ▸ Code sharing between platforms helps reduce development cost 6
  • 7. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 TRIVIA ▸ People have achieved up to 80% of code sharing between platforms 7
  • 8. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 REACT COMPONENTS (REACT AND REACT NATIVE ) 8 In react, UI is function of state and props REACT COMPONENT properties, state Your react component decide how it should look based on props and states and spits out a description of the UI. You don’t touch the webpage. This thing makes possible for us to have react-native
  • 9. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 REACT / REACT NATIVE COMPONENT (REACT AND REACT NATIVE ) 9 REACT JS BROWSER DOM REACT NATIVE IOS class Hello extends Component { render() { return (<div>Hello</div> ) } } ANDROID SOMEWHERE ELSE class Hello extends Component { render() { return (<View> <Text>Hello</Text> </View> ) } } React Component React Native Component Bridges
  • 10. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 BROWSER VS DOM (REACT AND REACT NATIVE ) ▸ <div> ▸ <img> ▸ <span>, <p> ▸ <ul>,<ol> ▸ <button> 10 ▸ <View> ▸ <Image> ▸ <Text> ▸ <FlatList>, <SectionList> ▸ <Button>, <TouchableHighlight>… THEY WILL INVOKE REAL PLATFORM API
  • 11. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 STYLING (REACT AND REACT NATIVE ) 11 <div style={{ color:'red', fontSize:24 }}> Hello </div> <View> <Text style={{ color:'blue', fontSize:14 }}> Hello </Text> </View> React Component React Native Component const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'red', width: '100%' }, }); <View style={styles.container}> </View> React Native Component (recommended way) What is Stylesheet and why?
  • 12. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 STYLE SHEET (REACT AND REACT NATIVE ) 12 const styles = StyleSheet.create({ container: { borderRadius: 4, borderWidth: 0.5, borderColor: '#d6d7da', } }); ▸ Style will be referred by ID instead of creating a new style object every time, hence optimized ▸ All styles are send once through the bridge. All subsequent uses are going to refer an id (not implemented yet). A StyleSheet is an abstraction similar to CSS StyleSheets Learn flexbox and your life will be lot easier All css props are not available in React Native Unlike web browser Flexbox has default direct of column
  • 13. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 USING OPEN SOURCE LIBRARIES/COMPONENTS (REACT AND REACT NATIVE ) Pure javascript/react-native libraries will work as expected 13 Installing a package > yarn add axios > yarn add lodash > yarn add redux > yarn add something_else Using a package import _ from ‘lodash’ import axios from ’axios’ let result = await axios({url:’xyz.com’}) result = result.map(something) ….. and so on as expected for some libraries yo might have to run react-native link to link native dependencies
  • 14. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 WHO IS USING? 14 Famous apps built with react native • Walmart • Airbnb (stopped using) • Bloomberg • Sound Cloud • Wix • Tesla • Uber Eats • Palantir ……… Myntra
  • 15. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 ALTERNATIVES? ▸ Ionic ▸ Nativescript 15
  • 16. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 HOW TO START 1. MacOS is required to build iOS apps 2. Install nodejs 3. Install react native: npm install -g react-native-cli (yarn global add react-native-cli) 4. Install xcode (for IOS), Java8 or newer and android SDK (for Android) 5. Create new app: react-native init <project_name> (eg: react-native init MyCoolApp1) 6. Goto app: cd <project_name> 7.Start app: react-native run-ios / react-native run-android (start app) 16
  • 17. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 SIMPLE TODO APP 17
  • 18. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 BOX DESIGN OF APP 18 TEXTBOX BUTTON <View /> <TouchableHighlight /> <Text /> TEXT TEXT TEXT Flexbox is your friend
  • 19. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 OPIONION ▸ We at Clevero should heavily invest in React Native ▸ We should even build our staticphone app using React Native 19
  • 20. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 FURTHER READING ▸ How to run app on local device ▸ How to make network request ▸ How to create native module ▸ How to store data on device ▸ How to debug ▸ How to handle gesture and other device capabilities ▸ How to integrate with an existing application ▸ How publish your app 20
  • 21. PRAVEEN PRASAD. CLEVERO INC. OCT 2018 USEFUL LINKS ▸ Slide link ▸ GitHub link 21