SlideShare a Scribd company logo
1 of 58
From React to
React Native
Things I wish I knew when I started
23/11/2021
IMAGE GOES OVER HERE
Edoardo Dusi
@edodusi
Lead developer @ SparkFabrik
Things I wish I knew when I started
TOC (as suggested by kelset)
INTRO
Why RN
Welcome to the Mobile
world
The app bundle
UI COMPONENTS/NAVIGATION
Android Jetpack
iOS UIKit
React Navigation
THE LOCAL DEVELOPMENT
Metro
Flipper
Gradle
CocoaPods
Fastlane
THE JAVASCRIPT ENGINE
JavaScriptCore
Chrome V8
Hermes
How did I start?
“It’s exactly the same as the website”
Why React Native was born
● The company once called Facebook decided to go mobile first
● Tried with WebViews and HTML5 but failed
● Lack of keyboard API, gestures events and image management
● Coding is imperative
“Native environment is much more powerful than the web”
● Ability to parallelize work
● Sophisticated gesture handling
● Access to native capabilities
I’m just a useless section title
Best slide ever
<div> -> <View>
<span> -> <Text>
<input type=”text”> -> <InputText>
<button> -> <Button>
<img> - > <Image>
Oh that’s a quote, tech talks must have one
“Native environment is more hostile”
React.js Conf 2015 Keynote
Welcome to the
Mobile World
Another list, how creative
● Different instructions for dealing with
different platforms (SDKs)
● Memory management
● Thread concurrency
● Laying out subviews
● Provisioning profiles
● Deploying applications
What’s a Mobile Application?
Single line, clearer
A signed bundle of binaries, assets and metadata
.apk (Android Package)
A comparison, ok
.ipa (iOS App Store Package)
/META-INF
res
AndroidManifest.xml
classes.dex
resources.arsc
/Payload
/Payload/Application.app
/iTunesArtwork
/iTunesArtwork@2x
/iTunesMetadata.plist
/WatchKitSupport/WK
/META-INF
.aab (Android App Bundle)
Centered
● Contents of an Android app project
● Additional metadata that is not required at runtime
● Publishing format, not installable
● Defers APK generation and signing to a later stage
● Google Play generates optimized APKs that contain
only the resources and code required by a device
How can JavaScript code become a native app?
Stolen content
“They probably create an AST from the JS code and transform it to make it
run on multiple devices.”
https://hackernoon.com/understanding-react-native-bridge-concept-e9526066ddb8
Again
https://hackernoon.com/understanding-react-native-bridge-concept-e9526066ddb8
The JavaScript Engine
JavaScriptCore
(JSC)
Definitions!
● JavaScript engine for WebKit
● Currently powers Safari
● “Recommended” choice by Apple (RN was
first developed on iOS)
● Based on KJS, JavaScript engine of
KHTML, both part of the KDE project
● Written in C++
● Currently implements ECMAScript 2021
Chrome V8
(in debug mode)
Definitions! (again)
● JavaScript engine for Chrome
● Communicates with RN via WebSockets
● Written in C++
● Currently implements ECMAScript 2021
● Very similar to JavaScriptCore but there
are some differences
● There’s a project to support V8 as runtime
environment in RN:
https://github.com/Kudo/react-native-v8
Hermes
Definitions! (last one)
● JavaScript engine optimized for RN
(from 0.60.4)
● Written in C++
● Improved start-up time
● Decreased memory usage
● Smaller app size
● Implements the Chrome inspector protocol
● Currently implements ECMAScript 2020
Android
I wanna use Hermes!
iOS
android/app/build.gradle ios/Podfile
Hermes is opt-in
Great news!
“Looking forward … we can make Hermes the default JavaScript engine for
React Native across all platforms.”
https://reactnative.dev/blog/2021/10/26/toward-hermes-being-the-default
Ok, how about that native UI components?
It’s the official docs
“At runtime, React Native creates the corresponding Android and iOS views
for React components”
https://reactnative.dev/docs/intro-react-native-components
It’s the official docs!
“React Native has several of the most critical platform components already
wrapped, like ScrollView and TextInput”
https://reactnative.dev/docs/native-components-android
Android Jetpack
So this is Android
● A suite of libraries (Foundation,
Architecture, Behaviour and UI)
● Uses the AndroidX namespace
● Default since RN 0.60
● The jetifier tool is run before every
Android build to ensure compatibility
Material Design
Components
So this is Android
● MDC replaced the Design Support Library
● com.google.android.material namespace
● Material Theming: customize styles to
better reflect a brand
● A library of components
● Support gesture navigation
iOS UIKit
Hey that’s the Swift logo
● The Apple user interface framework for
iOS and tvOS apps
● Window and view architecture
● Event handling infrastructure for Multi-
Touch and other types of input
● The structure of UIKit apps is based on
the Model-View-Controller (MVC) design
pattern
Speaking of native languages...
Android
● The core language in Android SDK is Java
● There’s an NDK for compiling C and C++ libraries and link them in
Java
● Kotlin developed by JetBrains and now Apache 2 OSS
● 100% interoperable with the Java programming language and JVM
● Statically typed and more concise vs Java
● Compiling a bit slower than Java
● Kotlin/Native currently in the works, support for other platforms
such as embedded systems, macOS and iOS is coming
More coffee please
Kotlin
Classic
Java
iOS
● On iOS Objective-C was the reference language
● Developed as an object-oriented extension to the C language
● Popularized through NeXT and OpenStep, which became base API
for graphic libraries on macOS (later Cocoa)
● Swift presented at WWDC 2014 as the new language for iOS
● Simpler and modern syntax, more attractive for devs
● Better performances than Obj-C
I love obj-c
Swift
Ok maybe swift is a little cleaner
Objective-C
And what about the navigation
Principles of
navigation
(Android)
I’m starting to fear there are too many slides
● Fixed start destination
● Navigation state is represented as a stack
of destinations
● Up and Back are identical within your
app's task
● The Up button never exits your app
● Deep linking simulates manual navigation
https://developer.android.com/guide/navigation/navigation-principles
Principles of
navigation
(iOS)
D too many slides
● Always provide a clear path
● Use touch gestures to create fluidity
● Use standard navigation components
● Use a navigation bar to traverse a
hierarchy of data
● Use a tab bar to present peer categories
of content or functionality
● Use a page control when you have
multiple pages of the same type of
content
https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/navigation
React Navigation
The one I use
● Handles presentation of, and transition
between, multiple screens
● Similar to a web browser: app pushes and
pops items from the navigation stack, and
this results in seeing different screens
● Provides the gestures and animations
that you would expect on Android and iOS
when navigating between routes in the
stack
https://reactnavigation.org
Stolen from the Android docs
React Freeze
Brrr
● Allows for freezing renders of the parts of
the React component tree using
Suspense mechanism introduced in React
17
● Avoid unnecessary re-renders for parts
of the app that are not visible to the user
● State changes are executed as usual, just
won't trigger a render until the component
comes back from the frozen state
https://github.com/software-mansion-labs/react-freeze
How’s the local development compared to the web stack?
Metro
The local development
● Metro is a JavaScript bundler
● It takes an entry file and various deps,
and gives you back a single JavaScript file
● Converts assets (e.g. PNG files) into
objects that can be displayed by an Image
component
● Metro server is also used by Expo
https://facebook.github.io/metro
Flipper
High score
● Open-source, developed by Facebook
● A platform for debugging iOS, Android
and React Native apps
● Visualize, inspect, and control your apps
from a desktop interface
● Extendable: core plugins, community
plugins and you can create yours
● Connects to physical iOS devices via idb
https://fbflipper.com/docs/features/react-native
https://fbflipper.com/docs/features/plugins/network
Gradle
Approaching the end
● Open-source build automation tool
● Runs on the JVM and you must have a
Java Development Kit (JDK) installed
● IDEs supporting Gradle builds: Android
Studio, IntelliJ IDEA, Eclipse, NetBeans
● Dependency management currently only
supports Maven- and Ivy-compatible
repositories
● The core model is based on tasks
https://docs.gradle.org
Still Gradle
● Gradle can resolve dependencies from
one or many repositories
● Maven Central is a popular repository
hosting open source libraries
● The Google repository hosts Android-
specific artifacts including the Android
SDK
https://docs.gradle.org/current/userguide/declaring_repositories.html
CocoaPods
The iOS world
● Dependency manager for Obj-C and
Swift, built with Ruby
● Cocoa is Apple's native object-oriented
application programming interface (API)
● Dependencies described in Podfile
● XCode required for building
https://cocoapods.org
Continuous Integration
Fastlane
Last one?
● Open-source tool for automating iOS or
Android mobile app builds and releases
● Ruby configuration file called Fastfile, you
can add lanes to serve different purposes
● Integrates into existing CI services
● Spark GitHub Actions!
https://github.com/marketplace/actions/build-ios-action
https://github.com/marketplace/actions/build-android-app
https://fastlane.tools
Last one, I promise
https://github.com/sparkfabrik/android-build-action/blob/master/fastlane/Fastfile
Please stop
“Learn once, write anywhere.”
https://reactnative.dev
THANK YOU!
Edoardo Dusi
@edodusi

More Related Content

What's hot

React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core ConceptsDivyang Bhambhani
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js SimplifiedSunil Yadav
 
Introduction to react js and reasons to go with react js in 2020
Introduction to react js and reasons to go with react js in 2020Introduction to react js and reasons to go with react js in 2020
Introduction to react js and reasons to go with react js in 2020Concetto Labs
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .paradisetechsoftsolutions
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativeWaqqas Jabbar
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .paradisetechsoftsolutions
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITnamespaceit
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Previewvaluebound
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSKnoldus Inc.
 
Spring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSSpring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSVMware Tanzu
 
React js programming concept
React js programming conceptReact js programming concept
React js programming conceptTariqul islam
 
Using Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureUsing Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureMagnolia
 
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiI/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiDicoding
 

What's hot (20)

React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Introduction to react js and reasons to go with react js in 2020
Introduction to react js and reasons to go with react js in 2020Introduction to react js and reasons to go with react js in 2020
Introduction to react js and reasons to go with react js in 2020
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
React js basics
React js basicsReact js basics
React js basics
 
Spring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSSpring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWS
 
React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
ReactJS
ReactJSReactJS
ReactJS
 
Using Magnolia in a Microservices Architecture
Using Magnolia in a Microservices ArchitectureUsing Magnolia in a Microservices Architecture
Using Magnolia in a Microservices Architecture
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiI/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew Kurniadi
 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
 

Similar to From React to React Native - Things I wish I knew when I started

Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSZvika Epstein
 
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
 
React Native - Build Native Mobile App
React Native - Build Native Mobile AppReact Native - Build Native Mobile App
React Native - Build Native Mobile AppMobio Solutions
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentÖzcan Zafer AYAN
 
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 & GWTManuel Carrasco Moñino
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularTodd Anglin
 
SFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranSFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranGergely Kis
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Introduction to Ionic framework
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to Ionic frameworkShyjal Raazi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
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 NativeEric Deng
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application developmentKunjan Thakkar
 
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-webkitWittawas Wisarnkanchana
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkCihad Horuzoğlu
 

Similar to From React to React Native - Things I wish I knew when I started (20)

Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
React native
React nativeReact native
React native
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJS
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
 
React Native - Build Native Mobile App
React Native - Build Native Mobile AppReact Native - Build Native Mobile App
React Native - Build Native Mobile App
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
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
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
SFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with MigeranSFD 2014: Multiplatform App Development with Migeran
SFD 2014: Multiplatform App Development with Migeran
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Introduction to Ionic framework
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to Ionic framework
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
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
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
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
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 

More from sparkfabrik

KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetessparkfabrik
 
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...sparkfabrik
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtsparkfabrik
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pagessparkfabrik
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal frontesparkfabrik
 
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...sparkfabrik
 
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystemsparkfabrik
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfsparkfabrik
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...sparkfabrik
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudsparkfabrik
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplanesparkfabrik
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue paginesparkfabrik
 
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernosparkfabrik
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)sparkfabrik
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!sparkfabrik
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSsparkfabrik
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developerssparkfabrik
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes sparkfabrik
 

More from sparkfabrik (20)

KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
 
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
 
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
 
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloud
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
 
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developers
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes
 

Recently uploaded

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 TerraformAndrey Devyatkin
 
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 AutomationSafe Software
 
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 WorkerThousandEyes
 
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, Adobeapidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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 2024Rafal Los
 
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.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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 Processorsdebabhi2
 
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 Takeoffsammart93
 

Recently uploaded (20)

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
 
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
 
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 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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - 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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
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 React to React Native - Things I wish I knew when I started

  • 1. From React to React Native Things I wish I knew when I started 23/11/2021
  • 2. IMAGE GOES OVER HERE Edoardo Dusi @edodusi Lead developer @ SparkFabrik
  • 3.
  • 4. Things I wish I knew when I started
  • 5. TOC (as suggested by kelset) INTRO Why RN Welcome to the Mobile world The app bundle UI COMPONENTS/NAVIGATION Android Jetpack iOS UIKit React Navigation THE LOCAL DEVELOPMENT Metro Flipper Gradle CocoaPods Fastlane THE JAVASCRIPT ENGINE JavaScriptCore Chrome V8 Hermes
  • 6. How did I start?
  • 7.
  • 8. “It’s exactly the same as the website”
  • 9.
  • 10. Why React Native was born ● The company once called Facebook decided to go mobile first ● Tried with WebViews and HTML5 but failed ● Lack of keyboard API, gestures events and image management ● Coding is imperative “Native environment is much more powerful than the web” ● Ability to parallelize work ● Sophisticated gesture handling ● Access to native capabilities I’m just a useless section title
  • 11. Best slide ever <div> -> <View> <span> -> <Text> <input type=”text”> -> <InputText> <button> -> <Button> <img> - > <Image>
  • 12. Oh that’s a quote, tech talks must have one “Native environment is more hostile” React.js Conf 2015 Keynote
  • 13. Welcome to the Mobile World Another list, how creative ● Different instructions for dealing with different platforms (SDKs) ● Memory management ● Thread concurrency ● Laying out subviews ● Provisioning profiles ● Deploying applications
  • 14. What’s a Mobile Application?
  • 15. Single line, clearer A signed bundle of binaries, assets and metadata
  • 16. .apk (Android Package) A comparison, ok .ipa (iOS App Store Package) /META-INF res AndroidManifest.xml classes.dex resources.arsc /Payload /Payload/Application.app /iTunesArtwork /iTunesArtwork@2x /iTunesMetadata.plist /WatchKitSupport/WK /META-INF
  • 17. .aab (Android App Bundle) Centered ● Contents of an Android app project ● Additional metadata that is not required at runtime ● Publishing format, not installable ● Defers APK generation and signing to a later stage ● Google Play generates optimized APKs that contain only the resources and code required by a device
  • 18. How can JavaScript code become a native app?
  • 19. Stolen content “They probably create an AST from the JS code and transform it to make it run on multiple devices.” https://hackernoon.com/understanding-react-native-bridge-concept-e9526066ddb8
  • 20.
  • 23. JavaScriptCore (JSC) Definitions! ● JavaScript engine for WebKit ● Currently powers Safari ● “Recommended” choice by Apple (RN was first developed on iOS) ● Based on KJS, JavaScript engine of KHTML, both part of the KDE project ● Written in C++ ● Currently implements ECMAScript 2021
  • 24. Chrome V8 (in debug mode) Definitions! (again) ● JavaScript engine for Chrome ● Communicates with RN via WebSockets ● Written in C++ ● Currently implements ECMAScript 2021 ● Very similar to JavaScriptCore but there are some differences ● There’s a project to support V8 as runtime environment in RN: https://github.com/Kudo/react-native-v8
  • 25. Hermes Definitions! (last one) ● JavaScript engine optimized for RN (from 0.60.4) ● Written in C++ ● Improved start-up time ● Decreased memory usage ● Smaller app size ● Implements the Chrome inspector protocol ● Currently implements ECMAScript 2020
  • 26. Android I wanna use Hermes! iOS android/app/build.gradle ios/Podfile Hermes is opt-in
  • 27. Great news! “Looking forward … we can make Hermes the default JavaScript engine for React Native across all platforms.” https://reactnative.dev/blog/2021/10/26/toward-hermes-being-the-default
  • 28. Ok, how about that native UI components?
  • 29. It’s the official docs “At runtime, React Native creates the corresponding Android and iOS views for React components” https://reactnative.dev/docs/intro-react-native-components
  • 30. It’s the official docs! “React Native has several of the most critical platform components already wrapped, like ScrollView and TextInput” https://reactnative.dev/docs/native-components-android
  • 31. Android Jetpack So this is Android ● A suite of libraries (Foundation, Architecture, Behaviour and UI) ● Uses the AndroidX namespace ● Default since RN 0.60 ● The jetifier tool is run before every Android build to ensure compatibility
  • 32. Material Design Components So this is Android ● MDC replaced the Design Support Library ● com.google.android.material namespace ● Material Theming: customize styles to better reflect a brand ● A library of components ● Support gesture navigation
  • 33. iOS UIKit Hey that’s the Swift logo ● The Apple user interface framework for iOS and tvOS apps ● Window and view architecture ● Event handling infrastructure for Multi- Touch and other types of input ● The structure of UIKit apps is based on the Model-View-Controller (MVC) design pattern
  • 34. Speaking of native languages...
  • 35. Android ● The core language in Android SDK is Java ● There’s an NDK for compiling C and C++ libraries and link them in Java ● Kotlin developed by JetBrains and now Apache 2 OSS ● 100% interoperable with the Java programming language and JVM ● Statically typed and more concise vs Java ● Compiling a bit slower than Java ● Kotlin/Native currently in the works, support for other platforms such as embedded systems, macOS and iOS is coming More coffee please
  • 37. iOS ● On iOS Objective-C was the reference language ● Developed as an object-oriented extension to the C language ● Popularized through NeXT and OpenStep, which became base API for graphic libraries on macOS (later Cocoa) ● Swift presented at WWDC 2014 as the new language for iOS ● Simpler and modern syntax, more attractive for devs ● Better performances than Obj-C I love obj-c
  • 38. Swift Ok maybe swift is a little cleaner Objective-C
  • 39. And what about the navigation
  • 40. Principles of navigation (Android) I’m starting to fear there are too many slides ● Fixed start destination ● Navigation state is represented as a stack of destinations ● Up and Back are identical within your app's task ● The Up button never exits your app ● Deep linking simulates manual navigation https://developer.android.com/guide/navigation/navigation-principles
  • 41. Principles of navigation (iOS) D too many slides ● Always provide a clear path ● Use touch gestures to create fluidity ● Use standard navigation components ● Use a navigation bar to traverse a hierarchy of data ● Use a tab bar to present peer categories of content or functionality ● Use a page control when you have multiple pages of the same type of content https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/navigation
  • 42. React Navigation The one I use ● Handles presentation of, and transition between, multiple screens ● Similar to a web browser: app pushes and pops items from the navigation stack, and this results in seeing different screens ● Provides the gestures and animations that you would expect on Android and iOS when navigating between routes in the stack https://reactnavigation.org
  • 43.
  • 44. Stolen from the Android docs
  • 45. React Freeze Brrr ● Allows for freezing renders of the parts of the React component tree using Suspense mechanism introduced in React 17 ● Avoid unnecessary re-renders for parts of the app that are not visible to the user ● State changes are executed as usual, just won't trigger a render until the component comes back from the frozen state https://github.com/software-mansion-labs/react-freeze
  • 46. How’s the local development compared to the web stack?
  • 47. Metro The local development ● Metro is a JavaScript bundler ● It takes an entry file and various deps, and gives you back a single JavaScript file ● Converts assets (e.g. PNG files) into objects that can be displayed by an Image component ● Metro server is also used by Expo https://facebook.github.io/metro
  • 48. Flipper High score ● Open-source, developed by Facebook ● A platform for debugging iOS, Android and React Native apps ● Visualize, inspect, and control your apps from a desktop interface ● Extendable: core plugins, community plugins and you can create yours ● Connects to physical iOS devices via idb https://fbflipper.com/docs/features/react-native
  • 50. Gradle Approaching the end ● Open-source build automation tool ● Runs on the JVM and you must have a Java Development Kit (JDK) installed ● IDEs supporting Gradle builds: Android Studio, IntelliJ IDEA, Eclipse, NetBeans ● Dependency management currently only supports Maven- and Ivy-compatible repositories ● The core model is based on tasks https://docs.gradle.org
  • 51. Still Gradle ● Gradle can resolve dependencies from one or many repositories ● Maven Central is a popular repository hosting open source libraries ● The Google repository hosts Android- specific artifacts including the Android SDK https://docs.gradle.org/current/userguide/declaring_repositories.html
  • 52. CocoaPods The iOS world ● Dependency manager for Obj-C and Swift, built with Ruby ● Cocoa is Apple's native object-oriented application programming interface (API) ● Dependencies described in Podfile ● XCode required for building https://cocoapods.org
  • 54. Fastlane Last one? ● Open-source tool for automating iOS or Android mobile app builds and releases ● Ruby configuration file called Fastfile, you can add lanes to serve different purposes ● Integrates into existing CI services ● Spark GitHub Actions! https://github.com/marketplace/actions/build-ios-action https://github.com/marketplace/actions/build-android-app https://fastlane.tools
  • 55. Last one, I promise https://github.com/sparkfabrik/android-build-action/blob/master/fastlane/Fastfile
  • 56.
  • 57. Please stop “Learn once, write anywhere.” https://reactnative.dev