SlideShare a Scribd company logo
ReactJS
&
React Native
HELLO!
Hiten Pratap Singh
hiten@fintechlabs.in
https://github.com/hitenpratap/
https://hprog99.wordpress.com
1.
ReactJS?
“
A JavaScript library for
building user interfaces
What is ReactJS?
▹ A JS lib for building user interfaces
▹ Developed by Facebook & Instagram
▹ ReactJS is V in MVC
▹ ReactJS runs a Diffing algorithm to figure out what has
changed
Why do we use ReactJS?
▹ ReactJS is extremely fast, because it uses virtual DOM concept
▹ ReactJS uses special syntax called JSX, which allows to mix
HTML with JS
▹ When the data changes, ReactJS conceptually hits refresh
button and knows only to update the changed parts
▹ It’s all about building reusable components
▹ It’s much smaller and plays nicely with JQuery and other
frameworks
2.
ReactJS Concepts
ReactJS Concepts
▹ Components
▹ Virtual DOM
▹ JSX
▹ Props & States
▹ One Way Data Flow
Component
▹ Components let you split the UI into independent, reusable
pieces
Virtual DOM
▹ It’s a lightweight JS object which is a copy of real DOM
JSX
▹ JSX stands for JavaScript XML
▹ You can embed JavaScript expressions in JSX
▹ JSX Event Handlers are NOT Like HTML `onClick`
Props
▹ This simply is shorthand for properties
▹ Props are how components talk to each other
▹ Props are immutable
States
▹ Like props, state holds information about the component
▹ Props shouldn’t change, so state steps up
▹ So state is used so that a component can keep track of
information in between any renders that it does.
One Way Data Flow
▹ In React JS, data flows in one direction, from Parent to Child.
▹ Props are properties passed to a child component
3.
ReactJS Life Cycle
ReactJS Life Cycle
▹ Initialization
▹ Mounting
▹ Updation
▹ Unmounting
ReactJS Life Cycle
4.
Who Uses ReactJS?
Who uses ReactJS?
BIG
CONCEPT
React Native
20
5.
React Native?
“
Build native mobile apps
using JavaScript and
React
React Native?
▹ Write in React/JSX
▹ Run as a Native App
▹ Code runs in a JS Container
▹ iOS/Android
6.
Why React Native?
Why React Native?
▹ Common Codebase
▹ Low development cost & time
▹ No need to deploy apps again & again to stores to provide
updates
▹ Leverage all the awesome features of ReactJS
7.
How React Native
works?
How React Native works?
There are 4 threads in the React Native App
▹ UI Thread: Also known as Main Thread
▹ JS Thread: JS thread or Javascript thread is the thread where
the logic will run.
▹ Native Modules Thread: Sometimes an app needs access to
platform API, and this happens as part of native module thread.
▹ Render Thread: Only in Android L (5.0), react native render
thread is used to generate actual OpenGL commands used to
draw your UI.
React native
React native
8.
Sample Program
React native
8.
Difference between
Ionic and React Native
React native
Difference between Ionic & React Native
▹ Ionic is a regular web app, written using HTML, CSS, and JavaScript, but it
runs in a webview embedded in a native app instead of in a stand-alone
mobile browser
▹ React Native has a completely different architecture: instead of writing
your UI using web technologies, it uses the React component model to
render to native views
▹ Ionic is a Cordova based app that wrap current web app into a mobile
application. It uses the android existing web view to render the app so the
file size is quite small
▹ Meanwhile react native create bridge between JavaScript and native
component
▹ When it comes to memory usage, Ionic framework uses more than react
native apps
▹ The Ionic app is slower at loading videos because it needs to download
from other server, while in react native, it caches the tiles so it loads
faster
▹ When it comes to integration, react native can use every client based
JavaScript modules from npm (node package manager) whereas Ionic
uses only the Cordova-based code
Difference between Ionic & React Native
▹ Ionic is a framework that creates an idea of writing code only once
▹ React native is not a write once and run anywhere framework, but is
popularly touted as a “learn once, write anywhere” framework
▹ Ionic Framework app needs to use device features and APIs through
Apache Cordova plugins
▹ With react native you can access any device component or API
Based on the points above, you can see the difference in their functionalities, so
if you want to go for something that creates performant iOS and Android apps
that feel at home on their respective platforms ten you can opt for React Native.
And, if you are targeted at building hybrid mobile apps, Ionic is the best choice!
9.
Comparing Performances
b/w Ionic & React Native
React native
React native
React native
10.
Who uses React Native?
React native
11.
Setup React Native
Setup React Native
▹ Android Studio: https://developer.android.com/studio/index.html
▹ Android SDK(Without Android Studio):
https://developer.android.com/studio/index.html#command-tools
▹ Required Components which must be installed to run React Native App:
1.Google APIs
2.Android SDK Platform 23
3.Intel x86 Atom_64 System Image
4.Google APIs Intel x86 Atom_64 System Image
▹ JDK 8 is required to run sdkmanger of Android SDK so make sure about your JDK
version installed on the system.
▹ NodeJS version 6 or newer must be installed => https://nodejs.org/en/download/
▹ Finally we’ll use the npm to install React Native on our system:
npm install -g react-native-cli
▹ You can validate if all the above components have been installed properly on the
system by running the below command:
react-native -v
61,258
Github Stars
257
Releases
1,627 USERS
And a lot of contributors
44
Demo Time
THANKS!
Any questions?
Hiten Pratap Singh
hiten@fintechlabs.in
https://github.com/hitenpratap/
https://hprog99.wordpress.com
References
▹ https://hackernoon.com/virtual-dom-in-reactjs-43a3fdb1d130
▹ https://medium.com/javascript-scene/jsx-looks-like-an-abominatio
n-1c1ec351a918
▹ http://lucybain.com/blog/2016/react-state-vs-pros/
▹ https://hackernoon.com/understanding-state-and-props-in-react-9
4bc09232b9c
▹ https://openclassrooms.com/courses/build-web-apps-with-reactjs/
one-way-data-bindings
▹ https://medium.embengineering.com/in-react-js-data-flows-in-one
-direction-from-parent-to-child-841103ed3aed
▹ https://hackernoon.com/reactjs-component-lifecycle-methods-a-d
eep-dive-38275d9d13c0
▹ https://www.slideshare.net/TadeuZagallo/a-tour-of-react-native
▹ https://www.infoq.com/articles/react-native-introduction
▹ https://wetalkit.xyz/react-native-what-it-is-and-how-it-works-e2182
d008f5e
47

More Related Content

PDF
Experiences building apps with React Native @UtrechtJS May 2016
PPTX
React Native
PDF
Introduction to React Native & Rendering Charts / Graphs
PDF
From zero to hero with React Native!
PPTX
React Native Intro
PPTX
Creating books app with react native
PDF
Introduction to react native
PDF
Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @UtrechtJS May 2016
React Native
Introduction to React Native & Rendering Charts / Graphs
From zero to hero with React Native!
React Native Intro
Creating books app with react native
Introduction to react native
Experiences building apps with React Native @DomCode 2016

What's hot (20)

PDF
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
PDF
Optimizing React Native views for pre-animation
PDF
Lo mejor y peor de React Native @ValenciaJS
PDF
React Native: React Meetup 3
PDF
Getting Started with React Native (and should I use it at all?)
PDF
Top 8 benefits of react js
PPTX
React native - React(ive) Way To Build Native Mobile Apps
PDF
React native-meetup-talk
PDF
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
PPTX
React Native for ReactJS Devs
PDF
Intro To React Native
PPTX
React Native - Why Designers should use React native. And everyone else too.
PDF
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
PPT
Js frameworks
PDF
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
PPTX
React JS Belgium Touch Base - React, Flux, React Native
PDF
Алексей Волков "Введение в React Native"
PDF
Jquery react angular
PDF
React Native for multi-platform mobile applications
PPTX
React Native.pptx (2)
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
Optimizing React Native views for pre-animation
Lo mejor y peor de React Native @ValenciaJS
React Native: React Meetup 3
Getting Started with React Native (and should I use it at all?)
Top 8 benefits of react js
React native - React(ive) Way To Build Native Mobile Apps
React native-meetup-talk
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
React Native for ReactJS Devs
Intro To React Native
React Native - Why Designers should use React native. And everyone else too.
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
Js frameworks
Lviv MD Day 2015 Іван Лаврів "Mobile development with React Native"
React JS Belgium Touch Base - React, Flux, React Native
Алексей Волков "Введение в React Native"
Jquery react angular
React Native for multi-platform mobile applications
React Native.pptx (2)
Ad

Similar to React native (20)

PDF
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
PPTX
React Native - Build Native Mobile App
PPTX
React native
PPTX
From React to React Native - Things I wish I knew when I started
PPTX
React vs React Native
PDF
How React Native Works for iOS App Development
PPTX
Getting Started With React Native Presntation
PPTX
React Native And Its Ecosystem Presentation
PDF
ReactJS vs React Native
PPTX
Lecture 1 Introduction to React Native.pptx
PPTX
Difference between React JS and React Native
PDF
What is React Native and Why Should You Choose It For Mobile App
PPTX
How native is React Native? | React Native vs Native App Development
PDF
React Js Simplified
PPTX
What is ReactJS?
PDF
React native vs react js
PDF
the benefits of react native to developing ios and android application from s...
PDF
React native vs. ionic – which one is better and why
PDF
Why Businesses Should Hire React Native Developers to Build the Best Mobile A...
PDF
Checkout top 7 Reasons Why React Native is Growing Rapidly
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
React Native - Build Native Mobile App
React native
From React to React Native - Things I wish I knew when I started
React vs React Native
How React Native Works for iOS App Development
Getting Started With React Native Presntation
React Native And Its Ecosystem Presentation
ReactJS vs React Native
Lecture 1 Introduction to React Native.pptx
Difference between React JS and React Native
What is React Native and Why Should You Choose It For Mobile App
How native is React Native? | React Native vs Native App Development
React Js Simplified
What is ReactJS?
React native vs react js
the benefits of react native to developing ios and android application from s...
React native vs. ionic – which one is better and why
Why Businesses Should Hire React Native Developers to Build the Best Mobile A...
Checkout top 7 Reasons Why React Native is Growing Rapidly
Ad

More from NexThoughts Technologies (20)

PDF
PDF
Docker & kubernetes
PDF
Apache commons
PDF
Microservice Architecture using Spring Boot with React & Redux
PDF
Solid Principles
PDF
Introduction to TypeScript
PDF
Smart Contract samples
PDF
My Doc of geth
PDF
Geth important commands
PDF
Ethereum genesis
PPTX
Springboot Microservices
PDF
An Introduction to Redux
PPTX
Google authentication
Docker & kubernetes
Apache commons
Microservice Architecture using Spring Boot with React & Redux
Solid Principles
Introduction to TypeScript
Smart Contract samples
My Doc of geth
Geth important commands
Ethereum genesis
Springboot Microservices
An Introduction to Redux
Google authentication

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Modernizing your data center with Dell and AMD
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
A Presentation on Artificial Intelligence
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Modernizing your data center with Dell and AMD
The Rise and Fall of 3GPP – Time for a Sabbatical?
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A Presentation on Artificial Intelligence
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development

React native

  • 4. “ A JavaScript library for building user interfaces
  • 5. What is ReactJS? ▹ A JS lib for building user interfaces ▹ Developed by Facebook & Instagram ▹ ReactJS is V in MVC ▹ ReactJS runs a Diffing algorithm to figure out what has changed
  • 6. Why do we use ReactJS? ▹ ReactJS is extremely fast, because it uses virtual DOM concept ▹ ReactJS uses special syntax called JSX, which allows to mix HTML with JS ▹ When the data changes, ReactJS conceptually hits refresh button and knows only to update the changed parts ▹ It’s all about building reusable components ▹ It’s much smaller and plays nicely with JQuery and other frameworks
  • 8. ReactJS Concepts ▹ Components ▹ Virtual DOM ▹ JSX ▹ Props & States ▹ One Way Data Flow
  • 9. Component ▹ Components let you split the UI into independent, reusable pieces
  • 10. Virtual DOM ▹ It’s a lightweight JS object which is a copy of real DOM
  • 11. JSX ▹ JSX stands for JavaScript XML ▹ You can embed JavaScript expressions in JSX ▹ JSX Event Handlers are NOT Like HTML `onClick`
  • 12. Props ▹ This simply is shorthand for properties ▹ Props are how components talk to each other ▹ Props are immutable
  • 13. States ▹ Like props, state holds information about the component ▹ Props shouldn’t change, so state steps up ▹ So state is used so that a component can keep track of information in between any renders that it does.
  • 14. One Way Data Flow ▹ In React JS, data flows in one direction, from Parent to Child. ▹ Props are properties passed to a child component
  • 16. ReactJS Life Cycle ▹ Initialization ▹ Mounting ▹ Updation ▹ Unmounting
  • 22. “ Build native mobile apps using JavaScript and React
  • 23. React Native? ▹ Write in React/JSX ▹ Run as a Native App ▹ Code runs in a JS Container ▹ iOS/Android
  • 25. Why React Native? ▹ Common Codebase ▹ Low development cost & time ▹ No need to deploy apps again & again to stores to provide updates ▹ Leverage all the awesome features of ReactJS
  • 27. How React Native works? There are 4 threads in the React Native App ▹ UI Thread: Also known as Main Thread ▹ JS Thread: JS thread or Javascript thread is the thread where the logic will run. ▹ Native Modules Thread: Sometimes an app needs access to platform API, and this happens as part of native module thread. ▹ Render Thread: Only in Android L (5.0), react native render thread is used to generate actual OpenGL commands used to draw your UI.
  • 34. Difference between Ionic & React Native ▹ Ionic is a regular web app, written using HTML, CSS, and JavaScript, but it runs in a webview embedded in a native app instead of in a stand-alone mobile browser ▹ React Native has a completely different architecture: instead of writing your UI using web technologies, it uses the React component model to render to native views ▹ Ionic is a Cordova based app that wrap current web app into a mobile application. It uses the android existing web view to render the app so the file size is quite small ▹ Meanwhile react native create bridge between JavaScript and native component ▹ When it comes to memory usage, Ionic framework uses more than react native apps ▹ The Ionic app is slower at loading videos because it needs to download from other server, while in react native, it caches the tiles so it loads faster ▹ When it comes to integration, react native can use every client based JavaScript modules from npm (node package manager) whereas Ionic uses only the Cordova-based code
  • 35. Difference between Ionic & React Native ▹ Ionic is a framework that creates an idea of writing code only once ▹ React native is not a write once and run anywhere framework, but is popularly touted as a “learn once, write anywhere” framework ▹ Ionic Framework app needs to use device features and APIs through Apache Cordova plugins ▹ With react native you can access any device component or API Based on the points above, you can see the difference in their functionalities, so if you want to go for something that creates performant iOS and Android apps that feel at home on their respective platforms ten you can opt for React Native. And, if you are targeted at building hybrid mobile apps, Ionic is the best choice!
  • 43. Setup React Native ▹ Android Studio: https://developer.android.com/studio/index.html ▹ Android SDK(Without Android Studio): https://developer.android.com/studio/index.html#command-tools ▹ Required Components which must be installed to run React Native App: 1.Google APIs 2.Android SDK Platform 23 3.Intel x86 Atom_64 System Image 4.Google APIs Intel x86 Atom_64 System Image ▹ JDK 8 is required to run sdkmanger of Android SDK so make sure about your JDK version installed on the system. ▹ NodeJS version 6 or newer must be installed => https://nodejs.org/en/download/ ▹ Finally we’ll use the npm to install React Native on our system: npm install -g react-native-cli ▹ You can validate if all the above components have been installed properly on the system by running the below command: react-native -v
  • 46. THANKS! Any questions? Hiten Pratap Singh hiten@fintechlabs.in https://github.com/hitenpratap/ https://hprog99.wordpress.com
  • 47. References ▹ https://hackernoon.com/virtual-dom-in-reactjs-43a3fdb1d130 ▹ https://medium.com/javascript-scene/jsx-looks-like-an-abominatio n-1c1ec351a918 ▹ http://lucybain.com/blog/2016/react-state-vs-pros/ ▹ https://hackernoon.com/understanding-state-and-props-in-react-9 4bc09232b9c ▹ https://openclassrooms.com/courses/build-web-apps-with-reactjs/ one-way-data-bindings ▹ https://medium.embengineering.com/in-react-js-data-flows-in-one -direction-from-parent-to-child-841103ed3aed ▹ https://hackernoon.com/reactjs-component-lifecycle-methods-a-d eep-dive-38275d9d13c0 ▹ https://www.slideshare.net/TadeuZagallo/a-tour-of-react-native ▹ https://www.infoq.com/articles/react-native-introduction ▹ https://wetalkit.xyz/react-native-what-it-is-and-how-it-works-e2182 d008f5e 47