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

PDF
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
PDF
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
PDF
Front End Development for Back End Java Developers - NYJavaSIG 2019
PDF
Get Hip with Java Hipster - JavaOne 2017
PDF
Front End Development for Back End Java Developers - Jfokus 2020
PDF
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
PDF
A realtime infrastructure for Android apps: Firebase may be what you need..an...
PDF
Bootiful Development with Spring Boot and React - RWX 2017
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
Front End Development for Back End Java Developers - NYJavaSIG 2019
Get Hip with Java Hipster - JavaOne 2017
Front End Development for Back End Java Developers - Jfokus 2020
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
A realtime infrastructure for Android apps: Firebase may be what you need..an...
Bootiful Development with Spring Boot and React - RWX 2017

What's hot (20)

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

Similar to React native.key (20)

PPTX
Intro to React Native
PDF
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
PPTX
Introduction to React Native
PDF
Introduzione a React Native - Facebook Developer Circle Rome
PPTX
React native introduction (Mobile Warsaw)
PDF
Introduction to React Native
PPTX
Introduction to React Native
PDF
"React Native" by Vanessa Leo e Roberto Brogi
PDF
The Gist of React Native
PDF
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
PPTX
Introduction to react native @ TIC NUST
PDF
Developing Apps With React Native
PPTX
React native
PPTX
JS Fest 2018. Илья Иванов. Введение в React-Native
PPTX
React Native - Build Native Mobile App
PPTX
React Native And Its Ecosystem Presentation
PDF
React native: building native iOS apps with javascript
PPTX
React Native Building Mobile Apps with React.pptx
PDF
How Can the Hermes Engine Help React Native Apps.docx.pdf
PPTX
20180518 QNAP Seminar - Introduction to React Native
Intro to React Native
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Introduction to React Native
Introduzione a React Native - Facebook Developer Circle Rome
React native introduction (Mobile Warsaw)
Introduction to React Native
Introduction to React Native
"React Native" by Vanessa Leo e Roberto Brogi
The Gist of React Native
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
Introduction to react native @ TIC NUST
Developing Apps With React Native
React native
JS Fest 2018. Илья Иванов. Введение в React-Native
React Native - Build Native Mobile App
React Native And Its Ecosystem Presentation
React native: building native iOS apps with javascript
React Native Building Mobile Apps with React.pptx
How Can the Hermes Engine Help React Native Apps.docx.pdf
20180518 QNAP Seminar - Introduction to React Native
Ad

Recently uploaded (20)

PDF
Solved Past paper of Pediatric Health Nursing PHN BS Nursing 5th Semester
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PPTX
Reproductive system-Human anatomy and physiology
PDF
Civil Department's presentation Your score increases as you pick a category
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
semiconductor packaging in vlsi design fab
DOCX
Ibrahim Suliman Mukhtar CV5AUG2025.docx
PPTX
ACFE CERTIFICATION TRAINING ON LAW.pptx
PPTX
CAPACITY BUILDING PROGRAMME IN ADOLESCENT EDUCATION
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PPT
REGULATION OF RESPIRATION lecture note 200L [Autosaved]-1-1.ppt
PDF
Farming Based Livelihood Systems English Notes
PDF
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
PDF
faiz-khans about Radiotherapy Physics-02.pdf
PDF
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
PDF
Compact First Student's Book Cambridge Official
PDF
Everyday Spelling and Grammar by Kathi Wyldeck
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2015).pdf
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PPTX
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
Solved Past paper of Pediatric Health Nursing PHN BS Nursing 5th Semester
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
Reproductive system-Human anatomy and physiology
Civil Department's presentation Your score increases as you pick a category
Environmental Education MCQ BD2EE - Share Source.pdf
semiconductor packaging in vlsi design fab
Ibrahim Suliman Mukhtar CV5AUG2025.docx
ACFE CERTIFICATION TRAINING ON LAW.pptx
CAPACITY BUILDING PROGRAMME IN ADOLESCENT EDUCATION
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
REGULATION OF RESPIRATION lecture note 200L [Autosaved]-1-1.ppt
Farming Based Livelihood Systems English Notes
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
faiz-khans about Radiotherapy Physics-02.pdf
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
Compact First Student's Book Cambridge Official
Everyday Spelling and Grammar by Kathi Wyldeck
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2015).pdf
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx

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