SlideShare uma empresa Scribd logo
1 de 34
Introduction to React-Native
Waqqas Jabbar
13th July 2018
My Introduction
2000
NUST
2008
Right Hand Soft
Pvt. Ltd.
2012
Vadion (formally
Softrove)
2010
2016
20172004
2018
C C++ C# Web Mobile (RN)
PK10K - Training 10,000 Mobile App Developers
● Meetup
https://www.meetup.com/PK10-
React-Native-Mobile-App-
Development-Workship/
● Facebook Group
https://www.facebook.com/groups/1
0k.dev.pk/
Agenda
● Concepts
● FAQs
● Demos
○ Expo Demo
Clarify the ecosystem
● React.js
● React-Native
● Redux
● Flow
● JSX
● Babel
● Node
React.js: Basics
● Declarative Components
● Virtual DOM (Speed)
● One-way data binding ( VS
angular)
A JavaScript library for building user
interfaces
React.js: Components
● Components
○ Types
■ Stateless (props only)
■ Stateful (state)
○ render() function
○ Life-cycle
● Props
○ Allow arbitrary input to be passed to a component
○ User for parent-child communication
● State
○ Store data of component
React-Native
● Learn once, write anywhere (previous: write once, run anywhere)
○ Provide native experience
● Built on React.js
● Available for
○ Android: 4.1+
○ iOS: 8+
Why React-Native
● Faster development speed
● Lower cost of development
○ Code reuse
○ Easy to find developers
● Ship across multiple platform
● Over the Air (OTA) updates
React-Native: Architecture
● JS code running in Virtual
Machine (VM)
Who is using React-Native
Showcase
Prerequisites to React-Native Development
● JavaScript (Preferably ES6)
● Basic XCode/Android Studio usage
● Basic understanding on npm
Development Environment
● Any JavaScript Editor ( WebStorm, Atom)
● XCode
● Android Studio
● React-Native CLI
● Genymotion
● nvm ( Node version manager)
● node/npm
Development Experience
● Close to web
● Code changes instantaneously updated on mobile
● Use chrome for debugging
Complimentary Libraries
● React Navigation (https://reactnavigation.org/)
● React Redux (https://redux.js.org/)
● Redux Sagas (https://redux-saga.js.org/)
● Mobx (https://mobx.js.org/)
Search at https://js.coach/?collection=React+Native
UI Libraries
● React-native-elements (https://react-native-training.github.io/react-native-
elements/)
● Nativebase (https://nativebase.io/)
● Use native components
Challenges in React-Native Development
● Frequent updates of React-Native
○ App should be updated regularly
● Third-party libraries can become outdated
react-native-git-upgrade
Debugging
● Google Chrome
● Performance Monitor
● Inspector
● Reactotron (https://infinite.red/reactotron)
JSX
● XML like syntax
● Convert JSX to JS
Styling
● Flexbox
● Styled-components for CSS
○ (https://www.styled-components.com/)
Platform Specific Code
● filename.android.js
filename.ios.js
● Platform.OS === ‘android’
Platform.OS === ‘ios’
● <Component>Android
● <Component>IOS
Starting a new app
● npm install -g react-native-cli
● react-native init MyProject
● cd MyProject
● react-native run-ios
● react-native run-android
Installing a package
● yarn add <package-name>
● react-native link <package-name>
Expo
https://expo.io/
● Wrapper on commonly used react-native libraries
● iOS and Android App
● OTA
● Avoid for production apps (for now atleast)
Ignite CLI
● CLI
● Boilerplates, Plugins
ignite new MyApp
https://github.com/waqqas/ignite-aag-boilerplate
(MIT License)
Frequently Asked Questions
FAQ: Do I need to learn XCode/Android Studio
Answer: Yes
You need to know how to link native libraries. Fortunately, it is simple and
normally you just have to do as documented and you would be fine
FAQ: Do I have to write native code
Answer: No (Normally)
You would be writing code is Javascript. If there is some native functionality
that is not available, you have to write bridging code. React-Native provide
primitives to do so
FAQ: Do I have to rewrite my native app in RN
Answer: Yes
You can reuse parts of the native code by exposing it to react-native bridge.
Writing RN bridge requires knowledge of RN internals, as well as native (both
iOS and Android) code
FAQ: What backend should I use with RN
Answer: Any backend
You can user REST APIs or Firebase
Demo app have both REST APIs and Firebase
FAQ: Can you use my favorite JS library in RN
Answer: Yes (Probably)
You can use moment, lodash, axios and other pure Javascript libraries (that
don’t have a browser-specific component)
FAQ: How does React-Native help my startup
Answer: Best for early startup
● Make MVP quickly
● Over The Air (OTA) update help you modify the app without going through
the app-store process
FAQ: React-Native VS Ionic VS NativeScript
Answer: React-Native is performance focus. Uses Native UI
● https://stackshare.io/stackups/ionic-vs-nativescript-vs-react-native
Demos
Thank you
https://www.linkedin.com/in/waqqasjabbar/
https://twitter.com/waqqasjabbar
https://www.facebook.com/waqqas.jabbar
https://medium.com/@waqqas/
https://www.upwork.com/fl/waqqasj
waqqas.jabbar@gmail.com

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Starting with Reactjs
Starting with ReactjsStarting with Reactjs
Starting with Reactjs
 
React JS part 1
React JS part 1React JS part 1
React JS part 1
 
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
 
Getting started with Redux js
Getting started with Redux jsGetting started with Redux js
Getting started with Redux js
 
React Context API
React Context APIReact Context API
React Context API
 
Continuous delivery@LesFurets - DC Continuous delivery meetup
Continuous delivery@LesFurets - DC Continuous delivery meetupContinuous delivery@LesFurets - DC Continuous delivery meetup
Continuous delivery@LesFurets - DC Continuous delivery meetup
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
 
React js
React jsReact js
React js
 
A Brief Introduction to React.js
A Brief Introduction to React.jsA Brief Introduction to React.js
A Brief Introduction to React.js
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Workshop React.js
Workshop React.jsWorkshop React.js
Workshop React.js
 
React.js+Redux Workshops
React.js+Redux WorkshopsReact.js+Redux Workshops
React.js+Redux Workshops
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
 
How to Redux
How to ReduxHow to Redux
How to Redux
 
Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...
 
ServiceWorker: Exploring the Core of the Progressive Web App-Bagus Aji Santos...
ServiceWorker: Exploring the Core of the Progressive Web App-Bagus Aji Santos...ServiceWorker: Exploring the Core of the Progressive Web App-Bagus Aji Santos...
ServiceWorker: Exploring the Core of the Progressive Web App-Bagus Aji Santos...
 
7 Redux challenges
7 Redux challenges7 Redux challenges
7 Redux challenges
 
Docker - An Introduction
Docker - An IntroductionDocker - An Introduction
Docker - An Introduction
 
Redux Universal
Redux UniversalRedux Universal
Redux Universal
 
Internationalizing react apps
Internationalizing react appsInternationalizing react apps
Internationalizing react apps
 

Semelhante a Introduction to react native @ TIC NUST

Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
Fwdays
 

Semelhante a Introduction to react native @ TIC NUST (20)

Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
React native
React nativeReact native
React native
 
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
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Hands on react native
Hands on react nativeHands on react native
Hands on react native
 
Build a real app with react native
Build a real app with react nativeBuild a real app with react native
Build a real app with react native
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
 
Developing, building, testing and deploying react native apps
Developing, building, testing and deploying react native appsDeveloping, building, testing and deploying react native apps
Developing, building, testing and deploying react native apps
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
React native
React nativeReact native
React native
 
Nodejs
NodejsNodejs
Nodejs
 
React Native? A developer's perspective
React Native? A developer's perspectiveReact Native? A developer's perspective
React Native? A developer's perspective
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
React Native
React NativeReact Native
React Native
 
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
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 
Cross platform development
Cross platform developmentCross platform development
Cross platform development
 

Mais de Waqqas Jabbar

Mais de Waqqas Jabbar (11)

Jump into React-Native (Class 6)
Jump into React-Native  (Class 6)Jump into React-Native  (Class 6)
Jump into React-Native (Class 6)
 
Jump into React-Native (Class 5)
Jump into React-Native  (Class 5)Jump into React-Native  (Class 5)
Jump into React-Native (Class 5)
 
Jump into React-Native (Class 4)
Jump into React-Native  (Class 4)Jump into React-Native  (Class 4)
Jump into React-Native (Class 4)
 
Jump into React Native (Class 3)
Jump into React Native  (Class 3)Jump into React Native  (Class 3)
Jump into React Native (Class 3)
 
Jump into React-Native (Class 2/6)
Jump into React-Native  (Class 2/6)Jump into React-Native  (Class 2/6)
Jump into React-Native (Class 2/6)
 
Jump into React-Native (Class 1)
Jump into React-Native (Class 1)Jump into React-Native (Class 1)
Jump into React-Native (Class 1)
 
Crud application using react native, redux and redux sagas
Crud application using react native, redux and redux sagasCrud application using react native, redux and redux sagas
Crud application using react native, redux and redux sagas
 
Introduction To SVN
Introduction To SVNIntroduction To SVN
Introduction To SVN
 
Makefile Generation From Autotools
Makefile Generation From AutotoolsMakefile Generation From Autotools
Makefile Generation From Autotools
 
Introduction To Makefile
Introduction To MakefileIntroduction To Makefile
Introduction To Makefile
 
Introduction To SVN
Introduction To SVNIntroduction To SVN
Introduction To SVN
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Introduction to react native @ TIC NUST

Notas do Editor

  1. Thank you to NIC
  2. Link to people
  3. https://blog.codecentric.de/en/2017/11/developing-modern-offline-apps-reactjs-redux-electron-part-2-reactjs-basics/
  4. https://reactjs.org/docs/hello-world.html
  5. https://facebook.github.io/react-native/showcase.html
  6. https://facebook.github.io/react-native/docs/getting-started.html
  7. https://facebook.github.io/jsx/ https://reactjs.org/docs/introducing-jsx.html https://reactjs.org/docs/jsx-in-depth.html
  8. https://infinite.red/ignite