SlideShare a Scribd company logo
1 of 27
Download to read offline
React Native
& the Future of Web Technology
Mark Wilcox - Senior Analyst & Technology Lead
VisionMobile
What’s all the hype about React Native?
React
0
10000
20000
30000
40000
50000
60000
1
21
41
61
81
101
121
141
161
181
201
221
241
261
281
301
321
341
361
381
401
421
441
461
481
501
521
541
561
581
601
621
641
661
681
701
721
741
761
781
801
821
841
861
881
901
921
941
961
981
1001
1021
1041
1061
1081
1101
1121
1141
1161
1181
1201
1221
1241
React Native
GitHub
Stars
What’s all the hype about React Native?
• React is the 6th most starred project on GitHub (~52k stars)
• React Native is the 14th most starred (~38k stars)
• React Native is the fastest growing open source project in
terms of both stars and contributors (>1000 in 18 months)
• Microsoft has made a port to the Universal Window Platform
• Canonical has made a port to Ubuntu
• Facebook just launched a version for Oculus VR
Is the hype justified?
• Facebook engineers in a Reddit AMA have
said they aim to replace native development
• A former Apple UIKit engineer has said he
believes Facebook’s model is much better
Can Facebook be trusted?
Closed
Can Facebook be trusted?
It’s all about incentives!
Facebook didn’t use Parse for their core apps
Their incentives were not aligned with Parse users
Facebook use React Native extensively in production
• They are deeply committed to React, it’s what most of their
web apps are built with
• React Native was used to build Facebook Ad Manager
• It was used for much of Facebook Groups
• Following the success of these early experiments, Facebook
is growing their React Native team and is deploying new
features with it on the main app and Instagram
Other established companies are using it too
Airbnb Baidu QQ
Soundcloud Discord USwitch
So what is React Native?
MyComponent = React.createClass({
render: function () {
return <div>
<span>Hello World</span>
</div>
}});
React on the web: Components
So what is React Native?
MyComponent = React.createClass({
render: function () {
return <View>
<Text>Hello World</Text>
</View>
}});
React Native: Components
Platform native UI
components
So what is React Native?
MyComponent = React.createClass({
onClick: function () { alert("You clicked me")},
render: function () {
return <div>
<span onClick={this.onClick}>Hello</span>
</div>
}});
React on the web: Events
So what is React Native?
MyComponent = React.createClass({
onPress: function () { console.log("You pressed me")},
render: function () {
return <View>
<TouchableHighlight onPress={this.onPress}>
<Text>Hello</Text>
</TouchableHighlight>
</View>
}});
React Native: Events
Platform native
touch event
handler
So what is React Native?
MyComponent = React.createClass({
render: function () {
return <div class={divClasses}>
<span class={spanClasses}>Hello</Text>
</div>
}});
React on the web: Styling
Classes defined
in external CSS
file
So what is React Native?
MyComponent = React.createClass({
render: function () {
return <View style={styles.container}>
<Text style={styles.myStyle}>Hello</Text>
</View>
}});
React Native: Styling (1/3)
Styles defined
in JavaScript
So what is React Native?
var styles = StyleSheet.create({
myStyle: { color: 'red', fontSize: 12},
anotherStyle: { color: 'yellow', padding: 10, marginTop: 5}
container: {flex: 1, flexDirection: 'row',
justifyContent: 'center'}
});
React Native: Styling (2/3)
So what is React Native?
React Native: Styling (3/3)
• No CSS files, styles are defined in JavaScript
• Usually defined in the same file as the component
• Layout only via a (large) subset of Flexbox
How does it work?
• JavaScript runs in JavaScriptCore on iOS and Android
• All JavaScript logic and layout runs on a background thread
• Calls to native methods are batched and sent over a bridge
to native code (Objective-C on iOS, C++/Java on Android)
• The main thread runs (almost) only native drawing code,
enabling smooth 60fps animations and scrolling
Native
(Obj-C or Java/C++)
JS VM Bridge
How does it work?
• There’s a good set of built-in components
• There’s a declarative animation framework in JavaScript
• Developers with native coding skills can create their own
native components (separate versions for iOS & Android)
• Native modules can also be created for accessing any
native API, or third party native library
• Community modules can be published on npm and
registered on https://react.parts
Why does it matter?
• Developers increasingly need to be able to work on multiple
platforms and form factors:
• There’s too much to learn
• Maintaining multiple codebases is complex and expensive
• Facebook’s solution to this for their own development teams
could work for everyone - “Learn once, write everywhere”
• Iteration speed is really important
• JavaScript is “special”…
JavaScript is “special”
"" == 0 //true - empty string is coerced to Number 0
0 == "0" //true - Number 0 is coerced to String "0"
"" == "0" //false - operands are both String so no coercion
0.1 + 0.2 === 0.3 //false
var a = 0 * 1; // This simple sum gives 0
var b = 0 * -1; // This simple sum gives -0
a === b; //true: 0 equals -0
1/a === 1/b; //false: Infinity does not equal -Infinity
for(var i=0; i<10; i++) {
console.log(i);
}
var i;
console.log(i); // 10Not this
JavaScript is “special”
• JavaScript, and transpiled to JavaScript languages, are the
only choice on the web
• JavaScript is one of very few languages you can run on
almost all platforms outside the browser
• JavaScript is the only language you can download to iOS
devices to update apps outside the App Store
• So… JavaScript is the best suited language for iterating
quickly across multiple platforms - good job it evolving now
The future of web technology?
• Some of the React Native team have described what they’re
doing as building polyfills for web standards that haven’t
been fully developed yet
• This fits with the way other areas of web technology evolve
now, like JavaScript itself and Babel, or TypeScript / Flow
• Despite suggestions that React and Web Components are
competitors, they are complementary and compatible
• If we could create low-level components for mobile web apps
that were not tied to the DOM, what would they look like?
React Native for Web!
• Wait! Surely we already have React for the web?
• The low-level building blocks for React & React Native apps
are different, so a implementing the React Native primitives
helps make code portable, but…
• Twitter engineers weren’t actively deploying React Native
apps when they created React Native for Web
• They found that React Native’s consistent approach to style,
animation, touch, viewport adaptation, accessibility, themes &
RTL layout helped solve problems in their web apps
What’s wrong with React Native?
• Nothing’s perfect
• React Native is not great for teams with no native developers
(or people willing to learn) yet
• React Native is still evolving very fast and it can be quite a lot
of effort to keep up with the latest changes
• There are lots of 3rd party modules of poor quality - it’s not
easy to tell until you start to use them, unless you’re an
experienced native developer
• There are issues with animations synced with system
animations (e.g. keyboard sliding in from the bottom)
Where to find out more
• https://facebook.github.io/react-native/
• http://www.reactnative.com
• https://www.smashingmagazine.com/2016/04/consider-react-
native-mobile-app/
• https://react.parts/native?search=tree
Questions?

More Related Content

What's hot

What's hot (20)

Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor Day
 
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
React-Native for multi-platform mobile applications @ Codemotion Rome 2017React-Native for multi-platform mobile applications @ Codemotion Rome 2017
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
 
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
 
The Big Wave of Indian Startups - Almost Effortless Entrepreneurship Using Ruby
The Big Wave of Indian Startups - Almost Effortless Entrepreneurship Using RubyThe Big Wave of Indian Startups - Almost Effortless Entrepreneurship Using Ruby
The Big Wave of Indian Startups - Almost Effortless Entrepreneurship Using Ruby
 
Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016
 
Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...
 
How we built a job board in one week with JHipster
How we built a job board in one week with JHipsterHow we built a job board in one week with JHipster
How we built a job board in one week with JHipster
 
DevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sgDevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sg
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Frontend as a first class citizen
Frontend as a first class citizenFrontend as a first class citizen
Frontend as a first class citizen
 
Untangling4
Untangling4Untangling4
Untangling4
 
Managing Jenkins with Python
Managing Jenkins with PythonManaging Jenkins with Python
Managing Jenkins with Python
 
React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015
 
Succeeding with FOSS!
Succeeding with FOSS!Succeeding with FOSS!
Succeeding with FOSS!
 
React talk, GrunnJs 24 September 2014
React talk, GrunnJs 24 September 2014React talk, GrunnJs 24 September 2014
React talk, GrunnJs 24 September 2014
 
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL PluginConfiguration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
 
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
 

Viewers also liked

Viewers also liked (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
 
Wizardtechnologiesslides
WizardtechnologiesslidesWizardtechnologiesslides
Wizardtechnologiesslides
 
Li fi future technology
Li fi future technology Li fi future technology
Li fi future technology
 
Generations of wireless communication technologies and upcoming world
Generations of wireless communication technologies and upcoming worldGenerations of wireless communication technologies and upcoming world
Generations of wireless communication technologies and upcoming world
 
5 Upcoming Tech Innovations To Look Out For
5 Upcoming Tech Innovations To Look Out For5 Upcoming Tech Innovations To Look Out For
5 Upcoming Tech Innovations To Look Out For
 
Future of Artificial Intelligence - IFTF @ Fujitsu Labs 2015
Future of Artificial Intelligence - IFTF @ Fujitsu Labs 2015Future of Artificial Intelligence - IFTF @ Fujitsu Labs 2015
Future of Artificial Intelligence - IFTF @ Fujitsu Labs 2015
 
Machine Learning and Artificial Intelligence; Our future relationship with th...
Machine Learning and Artificial Intelligence; Our future relationship with th...Machine Learning and Artificial Intelligence; Our future relationship with th...
Machine Learning and Artificial Intelligence; Our future relationship with th...
 
Social digital tech trends 2016
Social digital tech trends 2016 Social digital tech trends 2016
Social digital tech trends 2016
 
Generation Z and the Future of Technology
Generation Z and the Future of TechnologyGeneration Z and the Future of Technology
Generation Z and the Future of Technology
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial Intelligence
 
The Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureThe Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The Future
 
The Future of Everything
The Future of EverythingThe Future of Everything
The Future of Everything
 
[Infographic] How will Internet of Things (IoT) change the world as we know it?
[Infographic] How will Internet of Things (IoT) change the world as we know it?[Infographic] How will Internet of Things (IoT) change the world as we know it?
[Infographic] How will Internet of Things (IoT) change the world as we know it?
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
 

Similar to React Native and the future of web technology (Mark Wilcox) - GreeceJS #15

l1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdfl1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdf
Hương Trà Pé Xjnk
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
 

Similar to React Native and the future of web technology (Mark Wilcox) - GreeceJS #15 (20)

l1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdfl1-reactnativeintroduction-160816150540.pdf
l1-reactnativeintroduction-160816150540.pdf
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScriptReact Native Introduction: Making Real iOS and Android Mobile App By JavaScript
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
 
Getting Started With React Native Presntation
Getting Started With React Native PresntationGetting Started With React Native Presntation
Getting Started With React Native Presntation
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
React Native - Framework For Mobile App (Seminar)
React Native - Framework For Mobile App (Seminar)React Native - Framework For Mobile App (Seminar)
React Native - Framework For Mobile App (Seminar)
 
React Native - Build Native Mobile App
React Native - Build Native Mobile AppReact Native - Build Native Mobile App
React Native - Build Native Mobile App
 
React Tech Salon
React Tech SalonReact Tech Salon
React Tech Salon
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
 
Hire React JS Developers
Hire React JS DevelopersHire React JS Developers
Hire React JS Developers
 
React Native_ Pros and Cons for Mobile app development.pdf
React Native_ Pros and Cons for Mobile app development.pdfReact Native_ Pros and Cons for Mobile app development.pdf
React Native_ Pros and Cons for Mobile app development.pdf
 
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, DisadvantagesReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
ReactJS Vs React Native: Understanding Differences, Advantages, Disadvantages
 
ReactJS.NET - Fast and Scalable Single Page Applications
ReactJS.NET - Fast and Scalable Single Page ApplicationsReactJS.NET - Fast and Scalable Single Page Applications
ReactJS.NET - Fast and Scalable Single Page Applications
 
Better web apps with React and Redux
Better web apps with React and ReduxBetter web apps with React and Redux
Better web apps with React and Redux
 

More from GreeceJS

More from GreeceJS (18)

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 ...
 
An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End ...
An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End ...An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End ...
An Emoji Introduction to React Native (Panagiotis Vourtsis, Senior Front End ...
 
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)
 
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

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 

React Native and the future of web technology (Mark Wilcox) - GreeceJS #15

  • 1. React Native & the Future of Web Technology Mark Wilcox - Senior Analyst & Technology Lead VisionMobile
  • 2. What’s all the hype about React Native? React 0 10000 20000 30000 40000 50000 60000 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 501 521 541 561 581 601 621 641 661 681 701 721 741 761 781 801 821 841 861 881 901 921 941 961 981 1001 1021 1041 1061 1081 1101 1121 1141 1161 1181 1201 1221 1241 React Native GitHub Stars
  • 3. What’s all the hype about React Native? • React is the 6th most starred project on GitHub (~52k stars) • React Native is the 14th most starred (~38k stars) • React Native is the fastest growing open source project in terms of both stars and contributors (>1000 in 18 months) • Microsoft has made a port to the Universal Window Platform • Canonical has made a port to Ubuntu • Facebook just launched a version for Oculus VR
  • 4. Is the hype justified? • Facebook engineers in a Reddit AMA have said they aim to replace native development • A former Apple UIKit engineer has said he believes Facebook’s model is much better
  • 5. Can Facebook be trusted? Closed
  • 6. Can Facebook be trusted? It’s all about incentives!
  • 7. Facebook didn’t use Parse for their core apps Their incentives were not aligned with Parse users
  • 8. Facebook use React Native extensively in production • They are deeply committed to React, it’s what most of their web apps are built with • React Native was used to build Facebook Ad Manager • It was used for much of Facebook Groups • Following the success of these early experiments, Facebook is growing their React Native team and is deploying new features with it on the main app and Instagram
  • 9. Other established companies are using it too Airbnb Baidu QQ Soundcloud Discord USwitch
  • 10. So what is React Native? MyComponent = React.createClass({ render: function () { return <div> <span>Hello World</span> </div> }}); React on the web: Components
  • 11. So what is React Native? MyComponent = React.createClass({ render: function () { return <View> <Text>Hello World</Text> </View> }}); React Native: Components Platform native UI components
  • 12. So what is React Native? MyComponent = React.createClass({ onClick: function () { alert("You clicked me")}, render: function () { return <div> <span onClick={this.onClick}>Hello</span> </div> }}); React on the web: Events
  • 13. So what is React Native? MyComponent = React.createClass({ onPress: function () { console.log("You pressed me")}, render: function () { return <View> <TouchableHighlight onPress={this.onPress}> <Text>Hello</Text> </TouchableHighlight> </View> }}); React Native: Events Platform native touch event handler
  • 14. So what is React Native? MyComponent = React.createClass({ render: function () { return <div class={divClasses}> <span class={spanClasses}>Hello</Text> </div> }}); React on the web: Styling Classes defined in external CSS file
  • 15. So what is React Native? MyComponent = React.createClass({ render: function () { return <View style={styles.container}> <Text style={styles.myStyle}>Hello</Text> </View> }}); React Native: Styling (1/3) Styles defined in JavaScript
  • 16. So what is React Native? var styles = StyleSheet.create({ myStyle: { color: 'red', fontSize: 12}, anotherStyle: { color: 'yellow', padding: 10, marginTop: 5} container: {flex: 1, flexDirection: 'row', justifyContent: 'center'} }); React Native: Styling (2/3)
  • 17. So what is React Native? React Native: Styling (3/3) • No CSS files, styles are defined in JavaScript • Usually defined in the same file as the component • Layout only via a (large) subset of Flexbox
  • 18. How does it work? • JavaScript runs in JavaScriptCore on iOS and Android • All JavaScript logic and layout runs on a background thread • Calls to native methods are batched and sent over a bridge to native code (Objective-C on iOS, C++/Java on Android) • The main thread runs (almost) only native drawing code, enabling smooth 60fps animations and scrolling Native (Obj-C or Java/C++) JS VM Bridge
  • 19. How does it work? • There’s a good set of built-in components • There’s a declarative animation framework in JavaScript • Developers with native coding skills can create their own native components (separate versions for iOS & Android) • Native modules can also be created for accessing any native API, or third party native library • Community modules can be published on npm and registered on https://react.parts
  • 20. Why does it matter? • Developers increasingly need to be able to work on multiple platforms and form factors: • There’s too much to learn • Maintaining multiple codebases is complex and expensive • Facebook’s solution to this for their own development teams could work for everyone - “Learn once, write everywhere” • Iteration speed is really important • JavaScript is “special”…
  • 21. JavaScript is “special” "" == 0 //true - empty string is coerced to Number 0 0 == "0" //true - Number 0 is coerced to String "0" "" == "0" //false - operands are both String so no coercion 0.1 + 0.2 === 0.3 //false var a = 0 * 1; // This simple sum gives 0 var b = 0 * -1; // This simple sum gives -0 a === b; //true: 0 equals -0 1/a === 1/b; //false: Infinity does not equal -Infinity for(var i=0; i<10; i++) { console.log(i); } var i; console.log(i); // 10Not this
  • 22. JavaScript is “special” • JavaScript, and transpiled to JavaScript languages, are the only choice on the web • JavaScript is one of very few languages you can run on almost all platforms outside the browser • JavaScript is the only language you can download to iOS devices to update apps outside the App Store • So… JavaScript is the best suited language for iterating quickly across multiple platforms - good job it evolving now
  • 23. The future of web technology? • Some of the React Native team have described what they’re doing as building polyfills for web standards that haven’t been fully developed yet • This fits with the way other areas of web technology evolve now, like JavaScript itself and Babel, or TypeScript / Flow • Despite suggestions that React and Web Components are competitors, they are complementary and compatible • If we could create low-level components for mobile web apps that were not tied to the DOM, what would they look like?
  • 24. React Native for Web! • Wait! Surely we already have React for the web? • The low-level building blocks for React & React Native apps are different, so a implementing the React Native primitives helps make code portable, but… • Twitter engineers weren’t actively deploying React Native apps when they created React Native for Web • They found that React Native’s consistent approach to style, animation, touch, viewport adaptation, accessibility, themes & RTL layout helped solve problems in their web apps
  • 25. What’s wrong with React Native? • Nothing’s perfect • React Native is not great for teams with no native developers (or people willing to learn) yet • React Native is still evolving very fast and it can be quite a lot of effort to keep up with the latest changes • There are lots of 3rd party modules of poor quality - it’s not easy to tell until you start to use them, unless you’re an experienced native developer • There are issues with animations synced with system animations (e.g. keyboard sliding in from the bottom)
  • 26. Where to find out more • https://facebook.github.io/react-native/ • http://www.reactnative.com • https://www.smashingmagazine.com/2016/04/consider-react- native-mobile-app/ • https://react.parts/native?search=tree