SlideShare a Scribd company logo
1 of 47
Download to read offline
React/Redux Workshop
Sebastián Alarcón - Web UI Developer - johan.alarcon@globant.com
Intro
● Theoretical and practical workshop
● We’re going to talk about React, Router and Redux
● There is no definitive knowledge
● We’re going to have a practical section after each theoric section
What you can expect from the Workshop
● Learn the most you can
● Code whatever you learned
● Get motivated to learn more
● Get interested in UI Development and new technologies
What I expect from you
● Respect
● Vibrate or silent mode to your phone
● You can pick up your phone but, please, leave the room.
● If you feel that you don’t understand something write down your
questions and ask once each theoric part finishes
● You have a laptop and Node/npm installed
● Have fun!
Let’s talk about React!
What is React?
So… Why React?
Virtual DOM
● Create lightweight description of UI components
● Representation of a UI is kept in memory and synced with the “real”
DOM
● Diff between states
● Compute minimal set of changes to apply to the DOM
● Different to Shadow DOM!
Virtual DOM - Summary
1. The entire virtual DOM gets updated.
2. The virtual DOM gets compared to what it looked like before you
updated it. React figures out which objects have changed.
3. The changed objects, and the changed objects only, get updated on the
real DOM.
JSX
class HelloMessage extends React.Component
{
render() {
return (
<div>
Hello World
</div>
);
}
}
ReactDOM.render(
<HelloMessage />,
mountNode
);
This is an optional HTML markup
and processor translates to plain JS
State and Props A Property is:
● Attribute
● Quality
● Characteristic
In React we called them props
and we can access to them using
this.props
First Props!
State and Props
We have two useful objects:
● defaultProps
● propTypes
The component props can be defined by itself or can be passed by its parent
For data that is going to change, we
have to use state (dynamic data!)
1. Is it passed in from a parent via
props?
If so, it probably isn't state
2. Does it remain unchanged over
time
If so, it probably isn't state
State and Props
Now the State!
State and Props
Some useful things here:
● getInitialState
● setState(data, callback)
● User inputs
● Event handlers
Lifecycle
Lifecycle - Mounting
Lifecycle - Updating - State changed
Lifecycle - Updating - Props changed
Lifecycle - Unmounting
What is coming? Routing and
Redux...
But first… create-react-app
create-react-app
Is a tool built by developers at Facebook to help you build React applications. It
saves you from time-consuming setup and configuration. You simply run one
command and create react app sets up the tools you need to start your React
project.
create-react-app
You must have:
● npm +5
And then run:
npx create-react-app my-app
Configuring git into our new app
● cd my app
● git init
● git remote add origin
https://github.com/Sebas-Alarcon-WebUI/react-redux-workshop.git
Now we’re going to Route!
How to implement it
React Router
This is the Declarative routing for React
We have to install:
npm install react-router react-router-dom
Let’s have some
rest.
10 min break!
And finally… Redux!
What is Redux?
Why Redux?
Redux
The basic stuff to take into account
● ​Actions​
● ​Reducers​
● Store​
● Data Flow​
Actions
● Payloads of information
● The only source of information for the store
● Send them using store.dispatch().
● They describe WHAT happens
Reducers
Specify HOW the application's state
changes in response to actions sent to the
store.
Store
The Store is the object that brings
Actions and Reducers together.
Data Flow
Redux architecture revolves around a strict unidirectional data flow.
The lifecycle is:
1. You call store.dispatch(action).
2. The Redux store calls the reducer function you gave it.
3. The root reducer may combine the output of multiple reducers into a single
state tree.
4. The Redux store saves the complete state tree returned by the root reducer.
Installation
We have to install:
npm install redux react-redux redux-devtools-extension
redux-thunk
Thanks!

More Related Content

What's hot

Functional programing jargon
Functional programing jargonFunctional programing jargon
Functional programing jargonRemo Jansen
 
Making react more like rails
Making react more like railsMaking react more like rails
Making react more like railsLuke Morton
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous JavascriptGarrett Welson
 
Introduction to Higher Order Functions in Scala
Introduction to Higher Order Functions in Scala	Introduction to Higher Order Functions in Scala
Introduction to Higher Order Functions in Scala Knoldus Inc.
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter courseDmitriy Gutman
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Devang Garach
 
Tech Talk #4 : Functional Reactive Programming - Đặng Thái Sơn
Tech Talk #4 : Functional Reactive Programming - Đặng Thái SơnTech Talk #4 : Functional Reactive Programming - Đặng Thái Sơn
Tech Talk #4 : Functional Reactive Programming - Đặng Thái SơnNexus FrontierTech
 
From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)Alex Bunardzic
 

What's hot (10)

Functional programing jargon
Functional programing jargonFunctional programing jargon
Functional programing jargon
 
Making react more like rails
Making react more like railsMaking react more like rails
Making react more like rails
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
 
Introduction to Higher Order Functions in Scala
Introduction to Higher Order Functions in Scala	Introduction to Higher Order Functions in Scala
Introduction to Higher Order Functions in Scala
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter course
 
Javascript
JavascriptJavascript
Javascript
 
ReactJS Code Impact
ReactJS Code ImpactReactJS Code Impact
ReactJS Code Impact
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6
 
Tech Talk #4 : Functional Reactive Programming - Đặng Thái Sơn
Tech Talk #4 : Functional Reactive Programming - Đặng Thái SơnTech Talk #4 : Functional Reactive Programming - Đặng Thái Sơn
Tech Talk #4 : Functional Reactive Programming - Đặng Thái Sơn
 
From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)
 

Similar to Globant development week / React Redux Rorkshop

React js Rahil Memon
React js Rahil MemonReact js Rahil Memon
React js Rahil MemonRahilMemon5
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareVisual Engineering
 
Workshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedWorkshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedVisual Engineering
 
an Introduction to Redux
an Introduction to Reduxan Introduction to Redux
an Introduction to ReduxAmin Ashtiani
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptJohn Stevenson
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react jsStephieJohn
 
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 UIMarcin Grzywaczewski
 
React gsg presentation with ryan jung &amp; elias malik
React   gsg presentation with ryan jung &amp; elias malikReact   gsg presentation with ryan jung &amp; elias malik
React gsg presentation with ryan jung &amp; elias malikLama K Banna
 
React js programming concept
React js programming conceptReact js programming concept
React js programming conceptTariqul islam
 
React Workshop: Core concepts of react
React Workshop: Core concepts of reactReact Workshop: Core concepts of react
React Workshop: Core concepts of reactImran Sayed
 
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyThe virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyClóvis Neto
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesJumping Bean
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 

Similar to Globant development week / React Redux Rorkshop (20)

Redux workshop
Redux workshopRedux workshop
Redux workshop
 
React js Rahil Memon
React js Rahil MemonReact js Rahil Memon
React js Rahil Memon
 
React workshop
React workshopReact workshop
React workshop
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
 
Workshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux AdvancedWorkshop 22: ReactJS Redux Advanced
Workshop 22: ReactJS Redux Advanced
 
an Introduction to Redux
an Introduction to Reduxan Introduction to Redux
an Introduction to Redux
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
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
 
React gsg presentation with ryan jung &amp; elias malik
React   gsg presentation with ryan jung &amp; elias malikReact   gsg presentation with ryan jung &amp; elias malik
React gsg presentation with ryan jung &amp; elias malik
 
React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
React Workshop: Core concepts of react
React Workshop: Core concepts of reactReact Workshop: Core concepts of react
React Workshop: Core concepts of react
 
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyThe virtual DOM and how react uses it internally
The virtual DOM and how react uses it internally
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
The Road To Redux
The Road To ReduxThe Road To Redux
The Road To Redux
 
React.js+Redux Workshops
React.js+Redux WorkshopsReact.js+Redux Workshops
React.js+Redux Workshops
 

More from Globant

Webinar MLOps: When AA gets serious.
Webinar MLOps: When AA gets serious.Webinar MLOps: When AA gets serious.
Webinar MLOps: When AA gets serious.Globant
 
Google Cloud Spanner y NewSQL
Google Cloud Spanner y NewSQLGoogle Cloud Spanner y NewSQL
Google Cloud Spanner y NewSQLGlobant
 
Eventos Asíncronos como estrategia virtual
Eventos Asíncronos como estrategia virtualEventos Asíncronos como estrategia virtual
Eventos Asíncronos como estrategia virtualGlobant
 
Cultura y valores 4.0 para líderes 4.0
Cultura y valores 4.0 para líderes 4.0Cultura y valores 4.0 para líderes 4.0
Cultura y valores 4.0 para líderes 4.0Globant
 
Tech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaTech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaGlobant
 
Como impulsar tu carrera Salesforce
Como impulsar tu carrera SalesforceComo impulsar tu carrera Salesforce
Como impulsar tu carrera SalesforceGlobant
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGLGlobant
 
Converge augmented report
Converge augmented reportConverge augmented report
Converge augmented reportGlobant
 
Sistema de recomendación entiempo real usando Delta Lake
Sistema de recomendación entiempo real usando Delta LakeSistema de recomendación entiempo real usando Delta Lake
Sistema de recomendación entiempo real usando Delta LakeGlobant
 
Kubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todosKubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todosGlobant
 
Orquestando Pipelines de Datosen AWS con Step Function y AWS Glue
Orquestando Pipelines de Datosen AWS con Step Function y AWS GlueOrquestando Pipelines de Datosen AWS con Step Function y AWS Glue
Orquestando Pipelines de Datosen AWS con Step Function y AWS GlueGlobant
 
Apache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónApache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónGlobant
 
Navegando el desafío de transformación digital de los servicios financieros
Navegando el desafío de transformación digital de los servicios financierosNavegando el desafío de transformación digital de los servicios financieros
Navegando el desafío de transformación digital de los servicios financierosGlobant
 
Converge 2020
Converge 2020 Converge 2020
Converge 2020 Globant
 
Converge 2020
Converge 2020Converge 2020
Converge 2020Globant
 
Tendencias de tecnología para el recién egresado
Tendencias de tecnología para el recién egresadoTendencias de tecnología para el recién egresado
Tendencias de tecnología para el recién egresadoGlobant
 
SRE: ¿Qué es y cómo gestionar el Toil?
SRE: ¿Qué es y cómo gestionar el Toil?SRE: ¿Qué es y cómo gestionar el Toil?
SRE: ¿Qué es y cómo gestionar el Toil?Globant
 
Monitoreo en tiempo real para la mejora continua de una aplicación
Monitoreo en tiempo real para la mejora continua de una aplicaciónMonitoreo en tiempo real para la mejora continua de una aplicación
Monitoreo en tiempo real para la mejora continua de una aplicaciónGlobant
 
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?¿Cómo automatizar pruebas de infraestructura y no morir en el intento?
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?Globant
 
Automatización en AWS con Chatbot Serverless (Amazon Lex)
Automatización en AWS con Chatbot Serverless (Amazon Lex)Automatización en AWS con Chatbot Serverless (Amazon Lex)
Automatización en AWS con Chatbot Serverless (Amazon Lex)Globant
 

More from Globant (20)

Webinar MLOps: When AA gets serious.
Webinar MLOps: When AA gets serious.Webinar MLOps: When AA gets serious.
Webinar MLOps: When AA gets serious.
 
Google Cloud Spanner y NewSQL
Google Cloud Spanner y NewSQLGoogle Cloud Spanner y NewSQL
Google Cloud Spanner y NewSQL
 
Eventos Asíncronos como estrategia virtual
Eventos Asíncronos como estrategia virtualEventos Asíncronos como estrategia virtual
Eventos Asíncronos como estrategia virtual
 
Cultura y valores 4.0 para líderes 4.0
Cultura y valores 4.0 para líderes 4.0Cultura y valores 4.0 para líderes 4.0
Cultura y valores 4.0 para líderes 4.0
 
Tech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaTech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración Continua
 
Como impulsar tu carrera Salesforce
Como impulsar tu carrera SalesforceComo impulsar tu carrera Salesforce
Como impulsar tu carrera Salesforce
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGL
 
Converge augmented report
Converge augmented reportConverge augmented report
Converge augmented report
 
Sistema de recomendación entiempo real usando Delta Lake
Sistema de recomendación entiempo real usando Delta LakeSistema de recomendación entiempo real usando Delta Lake
Sistema de recomendación entiempo real usando Delta Lake
 
Kubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todosKubeflow: Machine Learning en Cloud para todos
Kubeflow: Machine Learning en Cloud para todos
 
Orquestando Pipelines de Datosen AWS con Step Function y AWS Glue
Orquestando Pipelines de Datosen AWS con Step Function y AWS GlueOrquestando Pipelines de Datosen AWS con Step Function y AWS Glue
Orquestando Pipelines de Datosen AWS con Step Function y AWS Glue
 
Apache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónApache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisión
 
Navegando el desafío de transformación digital de los servicios financieros
Navegando el desafío de transformación digital de los servicios financierosNavegando el desafío de transformación digital de los servicios financieros
Navegando el desafío de transformación digital de los servicios financieros
 
Converge 2020
Converge 2020 Converge 2020
Converge 2020
 
Converge 2020
Converge 2020Converge 2020
Converge 2020
 
Tendencias de tecnología para el recién egresado
Tendencias de tecnología para el recién egresadoTendencias de tecnología para el recién egresado
Tendencias de tecnología para el recién egresado
 
SRE: ¿Qué es y cómo gestionar el Toil?
SRE: ¿Qué es y cómo gestionar el Toil?SRE: ¿Qué es y cómo gestionar el Toil?
SRE: ¿Qué es y cómo gestionar el Toil?
 
Monitoreo en tiempo real para la mejora continua de una aplicación
Monitoreo en tiempo real para la mejora continua de una aplicaciónMonitoreo en tiempo real para la mejora continua de una aplicación
Monitoreo en tiempo real para la mejora continua de una aplicación
 
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?¿Cómo automatizar pruebas de infraestructura y no morir en el intento?
¿Cómo automatizar pruebas de infraestructura y no morir en el intento?
 
Automatización en AWS con Chatbot Serverless (Amazon Lex)
Automatización en AWS con Chatbot Serverless (Amazon Lex)Automatización en AWS con Chatbot Serverless (Amazon Lex)
Automatización en AWS con Chatbot Serverless (Amazon Lex)
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Globant development week / React Redux Rorkshop

  • 1. React/Redux Workshop Sebastián Alarcón - Web UI Developer - johan.alarcon@globant.com
  • 2. Intro ● Theoretical and practical workshop ● We’re going to talk about React, Router and Redux ● There is no definitive knowledge ● We’re going to have a practical section after each theoric section
  • 3. What you can expect from the Workshop ● Learn the most you can ● Code whatever you learned ● Get motivated to learn more ● Get interested in UI Development and new technologies
  • 4. What I expect from you ● Respect ● Vibrate or silent mode to your phone ● You can pick up your phone but, please, leave the room. ● If you feel that you don’t understand something write down your questions and ask once each theoric part finishes ● You have a laptop and Node/npm installed ● Have fun!
  • 5.
  • 9. Virtual DOM ● Create lightweight description of UI components ● Representation of a UI is kept in memory and synced with the “real” DOM ● Diff between states ● Compute minimal set of changes to apply to the DOM ● Different to Shadow DOM!
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Virtual DOM - Summary 1. The entire virtual DOM gets updated. 2. The virtual DOM gets compared to what it looked like before you updated it. React figures out which objects have changed. 3. The changed objects, and the changed objects only, get updated on the real DOM.
  • 15. JSX class HelloMessage extends React.Component { render() { return ( <div> Hello World </div> ); } } ReactDOM.render( <HelloMessage />, mountNode ); This is an optional HTML markup and processor translates to plain JS
  • 16.
  • 17. State and Props A Property is: ● Attribute ● Quality ● Characteristic In React we called them props and we can access to them using this.props First Props!
  • 18. State and Props We have two useful objects: ● defaultProps ● propTypes The component props can be defined by itself or can be passed by its parent
  • 19. For data that is going to change, we have to use state (dynamic data!) 1. Is it passed in from a parent via props? If so, it probably isn't state 2. Does it remain unchanged over time If so, it probably isn't state State and Props Now the State!
  • 20. State and Props Some useful things here: ● getInitialState ● setState(data, callback) ● User inputs ● Event handlers
  • 23. Lifecycle - Updating - State changed
  • 24. Lifecycle - Updating - Props changed
  • 26.
  • 27. What is coming? Routing and Redux...
  • 29. create-react-app Is a tool built by developers at Facebook to help you build React applications. It saves you from time-consuming setup and configuration. You simply run one command and create react app sets up the tools you need to start your React project.
  • 30. create-react-app You must have: ● npm +5 And then run: npx create-react-app my-app
  • 31. Configuring git into our new app ● cd my app ● git init ● git remote add origin https://github.com/Sebas-Alarcon-WebUI/react-redux-workshop.git
  • 32. Now we’re going to Route!
  • 34. React Router This is the Declarative routing for React We have to install: npm install react-router react-router-dom
  • 35.
  • 40. Redux The basic stuff to take into account ● ​Actions​ ● ​Reducers​ ● Store​ ● Data Flow​
  • 41. Actions ● Payloads of information ● The only source of information for the store ● Send them using store.dispatch(). ● They describe WHAT happens
  • 42. Reducers Specify HOW the application's state changes in response to actions sent to the store.
  • 43. Store The Store is the object that brings Actions and Reducers together.
  • 44. Data Flow Redux architecture revolves around a strict unidirectional data flow. The lifecycle is: 1. You call store.dispatch(action). 2. The Redux store calls the reducer function you gave it. 3. The root reducer may combine the output of multiple reducers into a single state tree. 4. The Redux store saves the complete state tree returned by the root reducer.
  • 45. Installation We have to install: npm install redux react-redux redux-devtools-extension redux-thunk
  • 46.