SlideShare a Scribd company logo
1 of 42
Download to read offline
Panagiotis Vourtsis
Front-End Developer @orfium
AN EMOJI INTRO
TO REACT NATIVE
#RNISAWESOME
WHAT I WILL TRY TO COVER
▸ What is RN anyway?
▸ RN API
▸ Examples
▸ Daily tools
▸ Native Modules
▸ Other alternatives
VUE
REACT
ANGULAR
BACKBONE METEOR.JS
EMBER.JS
POLYMER
MITHRIL
FIRST THOUGHTS
#RNISAWESOME
NATIVE APPS ? REALLY ??
▸ Faster
▸ Responsive
▸ Complex gestures
▸ Mobile functionalities usage
▸ Different market for users
but how to stay up with the scale etc?
WHAT IS RN ANYWAY?
#RNISAWESOME
REACT AND REACT NATIVE
ReactJS is a JavaScript library where you can use it to build user
interfaces for the web either standalone or being served from a
server.
What you will need?
‣ A bundler - Webpack setup
‣ Testing environment
‣ jest maybe
‣ enzyme maybe
‣ …etc
#RNISAWESOME
REACT AND REACT NATIVE
React Native is a mobile framework that uses ReactJS and compiles
to native app components.
This way it allowing you to build native mobile applications for
different platforms (iOS, Android, and Windows Mobile) in
JavaScript. In order to do so you will may need Xcode or Android
Studio
It comes out of the box with:
‣ packager (bundler) called metro
‣ jest environment for testing
‣ flow for typing
#RNISAWESOME
RN API
DIV
SPAN
IMG
VIEW
TEXT
IMAGE
TOUCHABLE OPACITY
SCROLLVIEW
…
SOME EXAMPLES
#RNISAWESOME
import React from 'react';
const Welcome = () => (
<div>
Welcome GreeceJS
</div>
);
export default Welcome;
import React from 'react';
import { Text, View } from ΄react-native΄;
const Welcome = () => (
<View>
<Text>Welcome GreeceJS </Text>
</View>
);
export default Welcome;
SIMPLE TRANSFORMATION
#RNISAWESOME
import React from 'react';
const Welcome = () => (
<div>
<span>Welcome GreeceJS </span>
<span style={{ marginTop: 100 }}>
Hey i am right here!
</span>
</div>
);
export default Welcome;
import React from 'react';
import { Text, ScrollView } from ΄react-
native΄;
const Welcome = () => (
<ScrollView>
<Text>Welcome GreeceJS </Text>
<Text style={{ marginTop: 100 }}>
Hey i am right here !!
</Text>
</ScrollView>
);
export default Welcome;
SCROLL CONTENT
#RNISAWESOME
import React from 'react';
const data = {[
{id: '11', key: 'Devin'},
{id: '12', key: 'Jackson'},
{id: '13', key: 'James'},
{id: '14', key: 'Joel'},
]}
const Rankings = () => (
<ul>
{data.map(({ key, id }) => (
<li key={id}>{key}</span>
)}
</ul>
);
export default Rankings;
import React from 'react';
import { Text, View, FlatList } from ΄react-native΄;
const Rankings = () => (
<View>
<FlatList
data={[
{id: '11', key: 'Devin'},
{id: '12', key: 'Jackson'},
{id: '13', key: ‘James'},
]}
keyExtractor={(item) => item.id}
renderItem={({ item }) => <Text>{item.key}
</Text>}
/>
</View>
);
export default Rankings;
LIST
#RNISAWESOME
{
container: {
width: 100%;
position: relative;
margin-top: 10px;
}
}
StyleSheet.create({
container: {
width: ‘100%’,
position: ‘relative’,
marginTop: 10
}
})
STYLING
Native App
MAIN THREAD
JAVASCRIPT
BRIDGE - NATIVE MODULES API
ASYNC
BATCHED
SERIALISABLE
SYNC
%Memorypercore
0
15
30
45
60
PROFILE TO DO LIST PAGE VIEW MAPS
56,02%
24,29%
44,2%
26,52%
42,34%
18%
45,73%
28,38%
Swift RN
CPU USAGE
#RNISAWESOME
DAILY TOOLS
This is the regular hot reload of react, on every change you can
see the changes on your simulator
HOT RELOADING
Reloads the app on every change
LIVE RELOAD
DEBUGGING - PERFORMANCE
Enables the debugging inspector
REMOTE JS DEBUGGING
Shows the frames per screen in order to see which screens
underperform
SHOW PERF MONITOR
#RNISAWESOME
DAILY TOOLS
RN debugging tools
‣ react-devtools (npm)
‣ react-native debugger (redux)
de-
‣ Inspect network requests like in web
‣ Redux inspect for state
‣ React profiling
#RNISAWESOME
REACT NATIVE CHALLENGES
Not very stable modules, event official ones (react-navigation)
iOS / android behave differently in some cases
Although is react doesn’t behave like a web app
Need to understand native renders differently
Keep in mind of performance when dealing with lists
Dealing with emulators vs physical devices
Error logging for production is often difficult to debug
#RNISAWESOME
REACT NATIVE PROS & CONS
✓ Hot reloading
✓ Multiple platforms
✓ Faster build for smaller apps
✓ On the fly JS Bundle
✓ Bigger pool of devs
- Lack of modules
- Native developers still needed
- Immaturity on tools
#RNISAWESOME
CURRENTLY
Facebook
FB Ads Skype Discord Pinterest
WalmartInstagramFB Analytics
TURNED AWAY
Udacity
Airbnb
REACT NATIVE APPS
WHAT IF THERE ARE NO READY
MODULES ??
NATIVE MODULES
#RNISAWESOME
MODULE PACKAGE
APPLICATION
VIEW
MANAGER
VIEW
REACT EXPOSURE
#RNISAWESOME
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new MeetupPackage()
);
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
}
#RNISAWESOME
public class JSMeetupPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
modules.add(new JSMeetupModule(reactContext));
return modules;
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
List<ViewManager> modules = new ArrayList<>();
modules.add(new JSMeetupViewManager(reactContext));
return modules; // if we have a view else return Collections.emptyList();
}
}
#RNISAWESOME
class JSMeetupModule extends ReactContextBaseJavaModule {
private static String mPremium = "";
public JSMeetupModule(ReactApplicationContext reactContext) {
super(reactContext);
...
}
@Override
public String getName() {
return "JSMeetup";
}
   @ReactMethod
public void setPremium(String premium) {
mPremium = premium;
}
}
#RNISAWESOME
MODULE PACKAGE
APPLICATION
VIEW
MANAGER
VIEW
REACT EXPOSURE
#RNISAWESOME
class JSMeetupReactView extends Component {
setPremium(str) {
NativeModules.JSMeetup.setPremium(str);
}
render() {
return <JSMeetupView
{...this.props}
ref="JSMeetupReactView"
/>;
};
}
const JSMeetupView = requireNativeComponent(
'JSMeetupView',
JSMeetupReactView,
{
nativeOnly: { onChange: true }
}
);
module.exports = JSMeetupReactView;
#RNISAWESOME
public class JSMeetupViewManager extends SimpleViewManager<JSMeetupView> {
private JSMeetupView view;
public JSMeetupViewManager(ReactApplicationContext reactContext) {
view = new JSMeetupView(reactContext);
}
…
@ReactProp(name = "inputUrl")
public void setInputUrl(JSMeetupView view, @Nullable String inputUrl) {
view.setInputUrl(inputUrl);
}
@Override
public void receiveCommand(JSMeetupView root, int commandId, @Nullable
ReadableArray args) {
switch (commandId) {
case "blah":
root.blah();
break;
}
}
}
#RNISAWESOME
public class JSMeetupView extends AnyComponent implements LifecycleEventListener {
public JSMeetupView(ReactApplicationContext context) {
super(context);
context.addLifecycleEventListener(this);
}
public void setInputUrl(String inputUrl) {
...
}
public void blah() {
...
}
}
#RNISAWESOME
MODULE PACKAGE
APPLICATION
VIEW
MANAGER
VIEW
REACT EXPOSURE
#RNISAWESOME
class JSMeetupReactView extends Component {
setPremium(str) {
NativeModules.JSMeetup.setPremium(str);
}
setInputUrl(url) {
NativeModules.JSMeetup.setInputUrl(url);
}
blah() {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.refs.JSMeetupReactView),
UIManager.JSMeetupView.Commands.blah,
null
);
}
render() {
return <JSMeetupView
{...this.props}
ref="JSMeetupReactView"
/>;
};
}
const JSMeetupView = requireNativeComponent(
'JSMeetupView',
JSMeetupReactView,
{
nativeOnly: { onChange: true }
}
);
module.exports = JSMeetupReactView;
EXPO VS RN INIT
#RNISAWESOME
Expo is the easiest way to start building a new React Native
application. It allows to start a project without installing or
configuring any tools to build native code
#RNISAWESOME
EXPONENTRN INIT
ios/
android/
index.js
App.js
index.js
App.js
it's not possible to include custom native modules beyond the React
Native APIs and components that are available in the Expo client app
#RNISAWESOME
▸ Will I need access to the Native portion of the codebase?
▸ Will I need any third party packages in my app that are not
supported by Expo?
▸ Will my app need to play audio while it is not in the foreground?
▸ Will my app need location services while it is not in the
foreground?
▸ Will I need push notification support?
▸ Am I comfortable working in Xcode and Android Studio?
OTHER ALTERNATIVES
#RNISAWESOME
▸ Ionic
▸ Run on a “webview” with cordova - performance issues
▸ Write once run everywhere
▸ Mimic the platform’s widgets to make your application look native
▸ Angular (lately you can write with VUE as well)
▸ Xamarin
▸ a complete set of tools (diagnostics, debugging)
▸ Just in time & Ahead of time compilation = faster application
startup
▸ You need to write on C#
THANK YOU !
Panagiotis Vourtsis
Front-End Developer @orfium
#RNISAWESOME
https://www.youtube.com/watch?v=hDviGU-57lU
https://medium.com/the-react-native-log/comparing-the-performance-
between-native-ios-swift-and-react-native-7b5490d363e2
https://gist.github.com/panvourtsis/
714155aa2325b7b3b35bdb91f53fe2d3
LINKS

More Related Content

What's hot

Adventures In JavaScript Testing
Adventures In JavaScript TestingAdventures In JavaScript Testing
Adventures In JavaScript TestingThomas Fuchs
 
Angular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesAngular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesOren Farhi
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
 
Testing JS with Jasmine
Testing JS with JasmineTesting JS with Jasmine
Testing JS with JasmineEvgeny Gurin
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testingjeresig
 
Web ui tests examples with selenide, nselene, selene & capybara
Web ui tests examples with  selenide, nselene, selene & capybaraWeb ui tests examples with  selenide, nselene, selene & capybara
Web ui tests examples with selenide, nselene, selene & capybaraIakiv Kramarenko
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsGR8Conf
 
How Reactive do we need to be
How Reactive do we need to beHow Reactive do we need to be
How Reactive do we need to beJana Karceska
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript ApplicationsThe Rolling Scopes
 
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c Hermione
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c HermioneJS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c Hermione
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c HermioneJSFestUA
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsBurt Beckwith
 
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]Iakiv Kramarenko
 
Ember and containers
Ember and containersEmber and containers
Ember and containersMatthew Beale
 
Making React Native UI Components with Swift
Making React Native UI Components with SwiftMaking React Native UI Components with Swift
Making React Native UI Components with SwiftRay Deck
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaExoLeaders.com
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 

What's hot (20)

Vuejs testing
Vuejs testingVuejs testing
Vuejs testing
 
Adventures In JavaScript Testing
Adventures In JavaScript TestingAdventures In JavaScript Testing
Adventures In JavaScript Testing
 
Angular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesAngular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of States
 
KISS Automation.py
KISS Automation.pyKISS Automation.py
KISS Automation.py
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Testing JS with Jasmine
Testing JS with JasmineTesting JS with Jasmine
Testing JS with Jasmine
 
Understanding JavaScript Testing
Understanding JavaScript TestingUnderstanding JavaScript Testing
Understanding JavaScript Testing
 
Web ui tests examples with selenide, nselene, selene & capybara
Web ui tests examples with  selenide, nselene, selene & capybaraWeb ui tests examples with  selenide, nselene, selene & capybara
Web ui tests examples with selenide, nselene, selene & capybara
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in Grails
 
How Reactive do we need to be
How Reactive do we need to beHow Reactive do we need to be
How Reactive do we need to be
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
 
Angularjs Performance
Angularjs PerformanceAngularjs Performance
Angularjs Performance
 
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c Hermione
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c HermioneJS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c Hermione
JS Fest 2018. Сергей Пузанков. E2E-тестирование фронтенда c Hermione
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in Grails
 
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
 
Ember and containers
Ember and containersEmber and containers
Ember and containers
 
Making React Native UI Components with Swift
Making React Native UI Components with SwiftMaking React Native UI Components with Swift
Making React Native UI Components with Swift
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
 
PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 

Similar to An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End Developer at Orfium)

Connect.js - Exploring React.Native
Connect.js - Exploring React.NativeConnect.js - Exploring React.Native
Connect.js - Exploring React.Nativejoshcjensen
 
React Native Androidはなぜ動くのか
React Native Androidはなぜ動くのかReact Native Androidはなぜ動くのか
React Native Androidはなぜ動くのかYukiya Nakagawa
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Robert DeLuca
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptGuy Royse
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developersPavel Lahoda
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon Berlin
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs[T]echdencias
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
N Things You Don't Want to Repeat in React Native
N Things You Don't Want to Repeat in React NativeN Things You Don't Want to Repeat in React Native
N Things You Don't Want to Repeat in React NativeAnton Kulyk
 
Reliable Javascript
Reliable Javascript Reliable Javascript
Reliable Javascript Glenn Stovall
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.Techugo
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
JSAnkara Swift v React Native
JSAnkara Swift v React NativeJSAnkara Swift v React Native
JSAnkara Swift v React NativeMuhammed Demirci
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaBabacar NIANG
 

Similar to An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End Developer at Orfium) (20)

Connect.js - Exploring React.Native
Connect.js - Exploring React.NativeConnect.js - Exploring React.Native
Connect.js - Exploring React.Native
 
React native by example by Vadim Ruban
React native by example by Vadim RubanReact native by example by Vadim Ruban
React native by example by Vadim Ruban
 
React Native Androidはなぜ動くのか
React Native Androidはなぜ動くのかReact Native Androidはなぜ動くのか
React Native Androidはなぜ動くのか
 
How to React Native
How to React NativeHow to React Native
How to React Native
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
Improving android experience for both users and developers
Improving android experience for both users and developersImproving android experience for both users and developers
Improving android experience for both users and developers
 
Droidcon2013 android experience lahoda
Droidcon2013 android experience lahodaDroidcon2013 android experience lahoda
Droidcon2013 android experience lahoda
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
React Native
React NativeReact Native
React Native
 
N Things You Don't Want to Repeat in React Native
N Things You Don't Want to Repeat in React NativeN Things You Don't Want to Repeat in React Native
N Things You Don't Want to Repeat in React Native
 
Reliable Javascript
Reliable Javascript Reliable Javascript
Reliable Javascript
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
React lecture
React lectureReact lecture
React lecture
 
JSAnkara Swift v React Native
JSAnkara Swift v React NativeJSAnkara Swift v React Native
JSAnkara Swift v React Native
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux Saga
 

More from GreeceJS

Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...
Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...
Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...GreeceJS
 
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...GreeceJS
 
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27Under the hood of RxJS (Dimitris Livas) - GreeceJS #27
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27GreeceJS
 
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...GreeceJS
 
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...GreeceJS
 
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22GreeceJS
 
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22GreeceJS
 
Taming forms with React
Taming forms with ReactTaming forms with React
Taming forms with ReactGreeceJS
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumThe JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumGreeceJS
 
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...GreeceJS
 
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)GreeceJS
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15GreeceJS
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17GreeceJS
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17GreeceJS
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2GreeceJS
 
GraphQL vs REST
GraphQL vs RESTGraphQL vs REST
GraphQL vs RESTGreeceJS
 
Ellak JavaScript Day
Ellak JavaScript DayEllak JavaScript Day
Ellak JavaScript DayGreeceJS
 
The history of asynchronous JavaScript
The history of asynchronous JavaScriptThe history of asynchronous JavaScript
The history of asynchronous JavaScriptGreeceJS
 
The tools & technologies behind Resin.io
The tools & technologies behind Resin.ioThe tools & technologies behind Resin.io
The tools & technologies behind Resin.ioGreeceJS
 

More from GreeceJS (19)

Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...
Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...
Introduction to react-query. A Redux alternative? (Nikos Kleidis, Front End D...
 
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...
Next.js and the pursuit of happiness (Dimitris Michalakos, Lead Developer at ...
 
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27Under the hood of RxJS (Dimitris Livas) - GreeceJS #27
Under the hood of RxJS (Dimitris Livas) - GreeceJS #27
 
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
 
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
 
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22
TypeScript: JavaScript that scales (Kostas Stergiou) - GreeceJS #22
 
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22
Migrating from Monolithic to Serverless (Kostas Katsikas) - GreeceJS #22
 
Taming forms with React
Taming forms with ReactTaming forms with React
Taming forms with React
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumThe JavaScript toolset for development on Ethereum
The JavaScript toolset for development on Ethereum
 
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
 
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2
 
GraphQL vs REST
GraphQL vs RESTGraphQL vs REST
GraphQL vs REST
 
Ellak JavaScript Day
Ellak JavaScript DayEllak JavaScript Day
Ellak JavaScript Day
 
The history of asynchronous JavaScript
The history of asynchronous JavaScriptThe history of asynchronous JavaScript
The history of asynchronous JavaScript
 
The tools & technologies behind Resin.io
The tools & technologies behind Resin.ioThe tools & technologies behind Resin.io
The tools & technologies behind Resin.io
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End Developer at Orfium)

  • 1. Panagiotis Vourtsis Front-End Developer @orfium AN EMOJI INTRO TO REACT NATIVE
  • 2. #RNISAWESOME WHAT I WILL TRY TO COVER ▸ What is RN anyway? ▸ RN API ▸ Examples ▸ Daily tools ▸ Native Modules ▸ Other alternatives
  • 5. #RNISAWESOME NATIVE APPS ? REALLY ?? ▸ Faster ▸ Responsive ▸ Complex gestures ▸ Mobile functionalities usage ▸ Different market for users but how to stay up with the scale etc?
  • 6. WHAT IS RN ANYWAY?
  • 7. #RNISAWESOME REACT AND REACT NATIVE ReactJS is a JavaScript library where you can use it to build user interfaces for the web either standalone or being served from a server. What you will need? ‣ A bundler - Webpack setup ‣ Testing environment ‣ jest maybe ‣ enzyme maybe ‣ …etc
  • 8. #RNISAWESOME REACT AND REACT NATIVE React Native is a mobile framework that uses ReactJS and compiles to native app components. This way it allowing you to build native mobile applications for different platforms (iOS, Android, and Windows Mobile) in JavaScript. In order to do so you will may need Xcode or Android Studio It comes out of the box with: ‣ packager (bundler) called metro ‣ jest environment for testing ‣ flow for typing
  • 11. #RNISAWESOME import React from 'react'; const Welcome = () => ( <div> Welcome GreeceJS </div> ); export default Welcome; import React from 'react'; import { Text, View } from ΄react-native΄; const Welcome = () => ( <View> <Text>Welcome GreeceJS </Text> </View> ); export default Welcome; SIMPLE TRANSFORMATION
  • 12. #RNISAWESOME import React from 'react'; const Welcome = () => ( <div> <span>Welcome GreeceJS </span> <span style={{ marginTop: 100 }}> Hey i am right here! </span> </div> ); export default Welcome; import React from 'react'; import { Text, ScrollView } from ΄react- native΄; const Welcome = () => ( <ScrollView> <Text>Welcome GreeceJS </Text> <Text style={{ marginTop: 100 }}> Hey i am right here !! </Text> </ScrollView> ); export default Welcome; SCROLL CONTENT
  • 13.
  • 14. #RNISAWESOME import React from 'react'; const data = {[ {id: '11', key: 'Devin'}, {id: '12', key: 'Jackson'}, {id: '13', key: 'James'}, {id: '14', key: 'Joel'}, ]} const Rankings = () => ( <ul> {data.map(({ key, id }) => ( <li key={id}>{key}</span> )} </ul> ); export default Rankings; import React from 'react'; import { Text, View, FlatList } from ΄react-native΄; const Rankings = () => ( <View> <FlatList data={[ {id: '11', key: 'Devin'}, {id: '12', key: 'Jackson'}, {id: '13', key: ‘James'}, ]} keyExtractor={(item) => item.id} renderItem={({ item }) => <Text>{item.key} </Text>} /> </View> ); export default Rankings; LIST
  • 15.
  • 16. #RNISAWESOME { container: { width: 100%; position: relative; margin-top: 10px; } } StyleSheet.create({ container: { width: ‘100%’, position: ‘relative’, marginTop: 10 } }) STYLING
  • 17. Native App MAIN THREAD JAVASCRIPT BRIDGE - NATIVE MODULES API ASYNC BATCHED SERIALISABLE SYNC
  • 18. %Memorypercore 0 15 30 45 60 PROFILE TO DO LIST PAGE VIEW MAPS 56,02% 24,29% 44,2% 26,52% 42,34% 18% 45,73% 28,38% Swift RN CPU USAGE
  • 19. #RNISAWESOME DAILY TOOLS This is the regular hot reload of react, on every change you can see the changes on your simulator HOT RELOADING Reloads the app on every change LIVE RELOAD DEBUGGING - PERFORMANCE Enables the debugging inspector REMOTE JS DEBUGGING Shows the frames per screen in order to see which screens underperform SHOW PERF MONITOR
  • 20. #RNISAWESOME DAILY TOOLS RN debugging tools ‣ react-devtools (npm) ‣ react-native debugger (redux) de- ‣ Inspect network requests like in web ‣ Redux inspect for state ‣ React profiling
  • 21. #RNISAWESOME REACT NATIVE CHALLENGES Not very stable modules, event official ones (react-navigation) iOS / android behave differently in some cases Although is react doesn’t behave like a web app Need to understand native renders differently Keep in mind of performance when dealing with lists Dealing with emulators vs physical devices Error logging for production is often difficult to debug
  • 22. #RNISAWESOME REACT NATIVE PROS & CONS ✓ Hot reloading ✓ Multiple platforms ✓ Faster build for smaller apps ✓ On the fly JS Bundle ✓ Bigger pool of devs - Lack of modules - Native developers still needed - Immaturity on tools
  • 23. #RNISAWESOME CURRENTLY Facebook FB Ads Skype Discord Pinterest WalmartInstagramFB Analytics TURNED AWAY Udacity Airbnb REACT NATIVE APPS
  • 24. WHAT IF THERE ARE NO READY MODULES ??
  • 27. #RNISAWESOME public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new MeetupPackage() ); } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } }
  • 28. #RNISAWESOME public class JSMeetupPackage implements ReactPackage { @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { List<NativeModule> modules = new ArrayList<>(); modules.add(new JSMeetupModule(reactContext)); return modules; } @Override public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { List<ViewManager> modules = new ArrayList<>(); modules.add(new JSMeetupViewManager(reactContext)); return modules; // if we have a view else return Collections.emptyList(); } }
  • 29. #RNISAWESOME class JSMeetupModule extends ReactContextBaseJavaModule { private static String mPremium = ""; public JSMeetupModule(ReactApplicationContext reactContext) { super(reactContext); ... } @Override public String getName() { return "JSMeetup"; }    @ReactMethod public void setPremium(String premium) { mPremium = premium; } }
  • 31. #RNISAWESOME class JSMeetupReactView extends Component { setPremium(str) { NativeModules.JSMeetup.setPremium(str); } render() { return <JSMeetupView {...this.props} ref="JSMeetupReactView" />; }; } const JSMeetupView = requireNativeComponent( 'JSMeetupView', JSMeetupReactView, { nativeOnly: { onChange: true } } ); module.exports = JSMeetupReactView;
  • 32. #RNISAWESOME public class JSMeetupViewManager extends SimpleViewManager<JSMeetupView> { private JSMeetupView view; public JSMeetupViewManager(ReactApplicationContext reactContext) { view = new JSMeetupView(reactContext); } … @ReactProp(name = "inputUrl") public void setInputUrl(JSMeetupView view, @Nullable String inputUrl) { view.setInputUrl(inputUrl); } @Override public void receiveCommand(JSMeetupView root, int commandId, @Nullable ReadableArray args) { switch (commandId) { case "blah": root.blah(); break; } } }
  • 33. #RNISAWESOME public class JSMeetupView extends AnyComponent implements LifecycleEventListener { public JSMeetupView(ReactApplicationContext context) { super(context); context.addLifecycleEventListener(this); } public void setInputUrl(String inputUrl) { ... } public void blah() { ... } }
  • 35. #RNISAWESOME class JSMeetupReactView extends Component { setPremium(str) { NativeModules.JSMeetup.setPremium(str); } setInputUrl(url) { NativeModules.JSMeetup.setInputUrl(url); } blah() { UIManager.dispatchViewManagerCommand( findNodeHandle(this.refs.JSMeetupReactView), UIManager.JSMeetupView.Commands.blah, null ); } render() { return <JSMeetupView {...this.props} ref="JSMeetupReactView" />; }; } const JSMeetupView = requireNativeComponent( 'JSMeetupView', JSMeetupReactView, { nativeOnly: { onChange: true } } ); module.exports = JSMeetupReactView;
  • 36. EXPO VS RN INIT
  • 37. #RNISAWESOME Expo is the easiest way to start building a new React Native application. It allows to start a project without installing or configuring any tools to build native code
  • 38. #RNISAWESOME EXPONENTRN INIT ios/ android/ index.js App.js index.js App.js it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app
  • 39. #RNISAWESOME ▸ Will I need access to the Native portion of the codebase? ▸ Will I need any third party packages in my app that are not supported by Expo? ▸ Will my app need to play audio while it is not in the foreground? ▸ Will my app need location services while it is not in the foreground? ▸ Will I need push notification support? ▸ Am I comfortable working in Xcode and Android Studio?
  • 41. #RNISAWESOME ▸ Ionic ▸ Run on a “webview” with cordova - performance issues ▸ Write once run everywhere ▸ Mimic the platform’s widgets to make your application look native ▸ Angular (lately you can write with VUE as well) ▸ Xamarin ▸ a complete set of tools (diagnostics, debugging) ▸ Just in time & Ahead of time compilation = faster application startup ▸ You need to write on C#
  • 42. THANK YOU ! Panagiotis Vourtsis Front-End Developer @orfium #RNISAWESOME https://www.youtube.com/watch?v=hDviGU-57lU https://medium.com/the-react-native-log/comparing-the-performance- between-native-ios-swift-and-react-native-7b5490d363e2 https://gist.github.com/panvourtsis/ 714155aa2325b7b3b35bdb91f53fe2d3 LINKS