SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Nikolas Vourlakis · Nikos Kampitakis · Stavros Bastakis
WHO WE ARE
Nikolas Vourlakis

Software Engineer

webtrails.gr

gr.linkedin.com/in/
nikolas-vourlakis Nikos Kampitakis

CEO

webtrails.gr

gr.linkedin.com/in/
kabitakis Stavros Bastakis

Web Developer

webtrails.gr

gr.linkedin.com/in/
bastakis
REACT VS
ANGULAR
NOT
WHAT IS REACT?
▸ “Declarative lib which keeps the DOM in sync with your
data”
▸ What, not How
▸ It is the VIEW only!
BACKGROUND
▸ Backed by Facebook
▸ Open-sourced in May 2013
▸ Used on Facebook since 2011 => Battle-tested
▸ Heavily used on:
▸ Facebook: likes, comments, notifications, page Insights, chat
messages
▸ Instagram and WhatsApp web apps built completely in React
MORE SUPPORTERS
Source: https://github.com/facebook/react/wiki/Sites-Using-React
IT’S GETTING INTERESTING
GOOGLE TRENDS
GITHUB
REACT GITHUB
PROFILES
HANDS-ON SESSION
WHAT WE ARE BUILDING
COMPONENTS
‣ Search
‣ Profile
‣ Profile List
Find the final example here:

github.com/devstaff-crete/react-github-profiles
HOW TO START
▸ A lot of boilerplate projects but…
▸ Create-react-app is just what you need to get started
▸ Officially supported way to create single-page React
applications
▸ https://github.com/facebookincubator/create-react-app
PROJECT GENERATION
▸ npm install -g create-react-app
▸ cd /to/project/root/folder
▸ create-react-app react-github-profiles
▸ cd react-github-profiles
▸ npm install
▸ npm start
INITIAL PROJECT STRUCTURE
▸ react-github-profiles/
▸ README.md
▸ node_modules/
▸ package.json
▸ .gitignore
▸ public/
▸ favicon.ico
▸ index.html
▸ src/
▸ App.css
▸ App.js
▸ App.test.js
▸ index.css
▸ index.js
▸ logo.svg
RENDERING INTO THE DOM
JSX
▸ JS extension
▸ It’s not a template language
▸ Can render to anything you like (html, mobile native UI)
▸ JSX compiles to javascript
▸ Handles various staff for you
▸ Prevents injection attacks
▸ Updates only what is needed

REACT ELEMENTS
▸ The smallest building blocks of React
▸ Unlike browser DOM elements, React elements are plain
objects
▸ Elements are what components are made of
FUNCTIONAL COMPONENTS
▸ Simplest way to define a component - just a javascript
function
▸ Accepts a props object argument and returns a React
component
CLASS COMPONENTS
THINGS TO NOTICE!
▸ Remember! Its JSX not Html
▸ Why className?
▸ All custom component names must start with a capital letter
▸ Don’t forget to export
PROFILE COMPONENT
LET’S REFACTOR THE PROFILE COMPONENT
TEXT
PROPS
▸ A way to pass data in React components
▸ Read-only
TYPE CHECKING PROPS
▸ Development only mode
▸ Examples
EXTRACT PROFILEINFO COMPONENT
PROFILELIST COMPONENT
▸ Move data to App component
▸ Iterate data and create profiles
dynamically
▸ Notice! Unique “key” attribute
STATE
▸ Only in Class components
▸ Should be initialised in the constructor method
▸ Is changed with setState() function
COMPONENT LIFECYCLE
▸ Mounting: These methods are called when an instance of a component is being created and inserted into the DOM:
▸ constructor()
▸ componentWillMount()
▸ render()
▸ componentDidMount()
▸ Updating: An update can be caused by changes to props or state. These methods are called when a component is being re-
rendered:
▸ componentWillReceiveProps()
▸ shouldComponentUpdate()
▸ componentWillUpdate()
▸ render()
▸ componentDidUpdate()
▸ Unmounting: This method is called when a component is being removed from the DOM:
▸ componentWillUnmount()
SEARCH COMPONENT
PASSING FUNCTIONS AS PROPS
▸ Defined in the parent App component
▸ Will be populated and executed by the child Search
component
▸ Necessary to pass data from child to parent
SUPPORTED EVENTS
▸ onKeyDown
▸ onFocus
▸ onChange
▸ onSubmit
▸ onClick
▸ onMouseEnter
▸ onScroll
▸ …
DOM AND VIRTUAL DOM
▸ React Only Updates What's Necessary!
REACT ECOSYSTEM
TOOLING
APPLICATION STATE - REDUX
ACTION
ACTION
STORE VIEWDISPATCHER
OTHER USEFUL MODULES
▸ React-router
▸ Immutability: Immutable.js, seamless-immutable
▸ CSS: Autoprefixer, react-css-modules, classnames
▸ Testing: Mocha, Jest, Enzyme
BROWSER DEV TOOLS
▸ React Developer Tools:

https://chrome.google.com/webstore/detail/react-developer-
tools/fmkadmapgofadopljbjfkapdkoienihi
▸ Redux Developer Tools:

https://chrome.google.com/webstore/detail/redux-devtools/
lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en
INFLUENCERS
React is fast-moving. Keep up with the updates!
▸ @jordwalke: React creator
▸ @dan_abramov: Redux creator
▸ @ryanflorence: React router creator
▸ @mjackson: React router creator
▸ @sebmarkbage
▸ @ken_wheeler
THANK YOU!

Contenu connexe

Tendances

Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeJuarez Filho
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialHeather McNamee
 
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG🎤 Hanno Embregts 🎸
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jiralenamattt
 
Evolution of GitLab Frontend
Evolution of GitLab FrontendEvolution of GitLab Frontend
Evolution of GitLab FrontendFatih Acet
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Parag Gajbhiye
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerSonatype
 
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Matt Raible
 
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web AppBring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web AppThe Software House
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building ChatbotsTessa Mero
 
GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab, Inc
 
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik Dorn
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik DornJava-Vienna: Spring Boot 1.x Overview/Intro by Dominik Dorn
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik DornDominik Dorn
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsKrish
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppChristopher Nguyen
 
Branching Strategies For Git and Subversion
Branching Strategies For Git and SubversionBranching Strategies For Git and Subversion
Branching Strategies For Git and SubversionElian, I.
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Mike McGarr
 
Why you can't ignore GitLab
Why you can't ignore GitLabWhy you can't ignore GitLab
Why you can't ignore GitLabPivorak MeetUp
 

Tendances (20)

Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in Realtime
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorial
 
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jira
 
Evolution of GitLab Frontend
Evolution of GitLab FrontendEvolution of GitLab Frontend
Evolution of GitLab Frontend
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for Docker
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
 
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
 
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web AppBring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building Chatbots
 
GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab webcast - Release 8.4
GitLab webcast - Release 8.4
 
Chatbots
ChatbotsChatbots
Chatbots
 
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik Dorn
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik DornJava-Vienna: Spring Boot 1.x Overview/Intro by Dominik Dorn
Java-Vienna: Spring Boot 1.x Overview/Intro by Dominik Dorn
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web App
 
Branching Strategies For Git and Subversion
Branching Strategies For Git and SubversionBranching Strategies For Git and Subversion
Branching Strategies For Git and Subversion
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)
 
Why you can't ignore GitLab
Why you can't ignore GitLabWhy you can't ignore GitLab
Why you can't ignore GitLab
 

En vedette

React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥Remo Jansen
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.jsMax Klymyshyn
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mochaRevath S Kumar
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit TestingEswara Kumar Palakollu
 
Como me veo como profesional
Como me veo  como profesionalComo me veo  como profesional
Como me veo como profesional000170812
 
Mi proyecto de vida
Mi proyecto de vidaMi proyecto de vida
Mi proyecto de vidapapollys
 
MI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORDMI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORDSoniarcos
 
Proyecto de vida paola terminado
Proyecto de vida paola terminadoProyecto de vida paola terminado
Proyecto de vida paola terminadoFredy Garcia
 
Mi proyecto de vida diapositivas
Mi proyecto de vida diapositivasMi proyecto de vida diapositivas
Mi proyecto de vida diapositivasNATYU24
 

En vedette (15)

Unit testing with Jasmine
Unit testing with JasmineUnit testing with Jasmine
Unit testing with Jasmine
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.js
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mocha
 
Reactjs
Reactjs Reactjs
Reactjs
 
PEDAGOGIA INFANTIL
PEDAGOGIA INFANTILPEDAGOGIA INFANTIL
PEDAGOGIA INFANTIL
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
 
Como me veo en un futuro
Como me veo en un futuroComo me veo en un futuro
Como me veo en un futuro
 
Como me veo como profesional
Como me veo  como profesionalComo me veo  como profesional
Como me veo como profesional
 
Ensayo de pedagogia
Ensayo de pedagogiaEnsayo de pedagogia
Ensayo de pedagogia
 
Mi proyecto de vida
Mi proyecto de vidaMi proyecto de vida
Mi proyecto de vida
 
Ejemplo de proyecto de vida
Ejemplo de proyecto de vidaEjemplo de proyecto de vida
Ejemplo de proyecto de vida
 
MI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORDMI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORD
 
Proyecto de vida paola terminado
Proyecto de vida paola terminadoProyecto de vida paola terminado
Proyecto de vida paola terminado
 
Mi proyecto de vida diapositivas
Mi proyecto de vida diapositivasMi proyecto de vida diapositivas
Mi proyecto de vida diapositivas
 

Similaire à React.js: The hottest JS lib for building UIs

Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsKai Koenig
 
React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016Simon Sturmer
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best PracticesFatih Acet
 
Ontrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD messOntrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD messDamien Coraboeuf
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsJames Stone
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsKai Koenig
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity7mind
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsMichael Kröll
 
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 comparison500Tech
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsZachary Klein
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andevMike Nakhimovich
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3adamsilverstein
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseDennis Moon
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...Joel Oleson
 
Ember addons, served three ways
Ember addons, served three waysEmber addons, served three ways
Ember addons, served three waysMike North
 

Similaire à React.js: The hottest JS lib for building UIs (20)

Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other things
 
React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016
 
VueJS Best Practices
VueJS Best PracticesVueJS Best Practices
VueJS Best Practices
 
Ontrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD messOntrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD mess
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-components
 
Meteor.js for DOers
Meteor.js for DOersMeteor.js for DOers
Meteor.js for DOers
 
React Native
React NativeReact Native
React Native
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity
 
code-camp-meteor
code-camp-meteorcode-camp-meteor
code-camp-meteor
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with Jenkins
 
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
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
Office Add-in development
Office Add-in developmentOffice Add-in development
Office Add-in development
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile Enterprise
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
 
Ember addons, served three ways
Ember addons, served three waysEmber addons, served three ways
Ember addons, served three ways
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
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
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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...
 
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
 

React.js: The hottest JS lib for building UIs

  • 1. Nikolas Vourlakis · Nikos Kampitakis · Stavros Bastakis
  • 2. WHO WE ARE Nikolas Vourlakis
 Software Engineer
 webtrails.gr
 gr.linkedin.com/in/ nikolas-vourlakis Nikos Kampitakis
 CEO
 webtrails.gr
 gr.linkedin.com/in/ kabitakis Stavros Bastakis
 Web Developer
 webtrails.gr
 gr.linkedin.com/in/ bastakis
  • 4. WHAT IS REACT? ▸ “Declarative lib which keeps the DOM in sync with your data” ▸ What, not How ▸ It is the VIEW only!
  • 5. BACKGROUND ▸ Backed by Facebook ▸ Open-sourced in May 2013 ▸ Used on Facebook since 2011 => Battle-tested ▸ Heavily used on: ▸ Facebook: likes, comments, notifications, page Insights, chat messages ▸ Instagram and WhatsApp web apps built completely in React
  • 9. WHAT WE ARE BUILDING COMPONENTS ‣ Search ‣ Profile ‣ Profile List Find the final example here:
 github.com/devstaff-crete/react-github-profiles
  • 10. HOW TO START ▸ A lot of boilerplate projects but… ▸ Create-react-app is just what you need to get started ▸ Officially supported way to create single-page React applications ▸ https://github.com/facebookincubator/create-react-app
  • 11. PROJECT GENERATION ▸ npm install -g create-react-app ▸ cd /to/project/root/folder ▸ create-react-app react-github-profiles ▸ cd react-github-profiles ▸ npm install ▸ npm start
  • 12. INITIAL PROJECT STRUCTURE ▸ react-github-profiles/ ▸ README.md ▸ node_modules/ ▸ package.json ▸ .gitignore ▸ public/ ▸ favicon.ico ▸ index.html ▸ src/ ▸ App.css ▸ App.js ▸ App.test.js ▸ index.css ▸ index.js ▸ logo.svg
  • 14. JSX ▸ JS extension ▸ It’s not a template language ▸ Can render to anything you like (html, mobile native UI) ▸ JSX compiles to javascript ▸ Handles various staff for you ▸ Prevents injection attacks ▸ Updates only what is needed

  • 15. REACT ELEMENTS ▸ The smallest building blocks of React ▸ Unlike browser DOM elements, React elements are plain objects ▸ Elements are what components are made of
  • 16. FUNCTIONAL COMPONENTS ▸ Simplest way to define a component - just a javascript function ▸ Accepts a props object argument and returns a React component
  • 18. THINGS TO NOTICE! ▸ Remember! Its JSX not Html ▸ Why className? ▸ All custom component names must start with a capital letter ▸ Don’t forget to export
  • 20. LET’S REFACTOR THE PROFILE COMPONENT
  • 21. TEXT PROPS ▸ A way to pass data in React components ▸ Read-only
  • 22. TYPE CHECKING PROPS ▸ Development only mode ▸ Examples
  • 24. PROFILELIST COMPONENT ▸ Move data to App component ▸ Iterate data and create profiles dynamically ▸ Notice! Unique “key” attribute
  • 25. STATE ▸ Only in Class components ▸ Should be initialised in the constructor method ▸ Is changed with setState() function
  • 26. COMPONENT LIFECYCLE ▸ Mounting: These methods are called when an instance of a component is being created and inserted into the DOM: ▸ constructor() ▸ componentWillMount() ▸ render() ▸ componentDidMount() ▸ Updating: An update can be caused by changes to props or state. These methods are called when a component is being re- rendered: ▸ componentWillReceiveProps() ▸ shouldComponentUpdate() ▸ componentWillUpdate() ▸ render() ▸ componentDidUpdate() ▸ Unmounting: This method is called when a component is being removed from the DOM: ▸ componentWillUnmount()
  • 28. PASSING FUNCTIONS AS PROPS ▸ Defined in the parent App component ▸ Will be populated and executed by the child Search component ▸ Necessary to pass data from child to parent
  • 29. SUPPORTED EVENTS ▸ onKeyDown ▸ onFocus ▸ onChange ▸ onSubmit ▸ onClick ▸ onMouseEnter ▸ onScroll ▸ …
  • 30. DOM AND VIRTUAL DOM ▸ React Only Updates What's Necessary!
  • 33. APPLICATION STATE - REDUX ACTION ACTION STORE VIEWDISPATCHER
  • 34. OTHER USEFUL MODULES ▸ React-router ▸ Immutability: Immutable.js, seamless-immutable ▸ CSS: Autoprefixer, react-css-modules, classnames ▸ Testing: Mocha, Jest, Enzyme
  • 35. BROWSER DEV TOOLS ▸ React Developer Tools:
 https://chrome.google.com/webstore/detail/react-developer- tools/fmkadmapgofadopljbjfkapdkoienihi ▸ Redux Developer Tools:
 https://chrome.google.com/webstore/detail/redux-devtools/ lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en
  • 36. INFLUENCERS React is fast-moving. Keep up with the updates! ▸ @jordwalke: React creator ▸ @dan_abramov: Redux creator ▸ @ryanflorence: React router creator ▸ @mjackson: React router creator ▸ @sebmarkbage ▸ @ken_wheeler