Why I am hooked on the future of React

Maurice De Beijer [MVP]
Maurice De Beijer [MVP]The Problem Solver at ABL - The Problem Solver
Why I am
hooked on the
future of React
@mauricedb
© ABL - The Problem Solver 1
 Maurice de Beijer
 The Problem Solver
 Microsoft MVP
 Freelance developer/instructor
 Twitter: @mauricedb
 Web: http://www.TheProblemSolver.nl
 E-mail: maurice.de.beijer@gmail.com
2ABL - The Problem Solver
Why I am hooked on the future of React
The React
Newsletter
© ABL - The Problem Solver 4
http://bit.ly/ReactNewsletter
History
of
Components
© ABL - The Problem Solver 5
Original
Component
API
© ABL - The Problem Solver 6
Class
Components
© ABL - The Problem Solver 7
State
&
Lifecycle
© ABL - The Problem Solver 8
The problem
with classes
© ABL - The Problem Solver 9
this
© ABL - The Problem Solver 10
Fat arrow for
some functions
© ABL - The Problem Solver 11
Single
responsibility
in multiple
functions
© ABL - The Problem Solver 12
Functional
Components
© ABL - The Problem Solver 13
The
Problem
© ABL - The Problem Solver 14
And
© ABL - The Problem Solver 15
If your only
tool …
© ABL - The Problem Solver 16
Deeply
Nested
Components
© ABL - The Problem Solver 17
Many are
wrappers to
add props
© ABL - The Problem Solver 18
Render
Props
© ABL - The Problem Solver 19
But…
© ABL - The Problem Solver 20
Introducing
Hooks
© ABL - The Problem Solver 21
Open
Mind
© ABL - The Problem Solver 22
State
© ABL - The Problem Solver 23
useState()
© ABL - The Problem Solver 24
Just
State
© ABL - The Problem Solver 25
Side Effects
© ABL - The Problem Solver 26
useEffect()
© ABL - The Problem Solver 27
Context
© ABL - The Problem Solver 28
Render
Props
© ABL - The Problem Solver 29
useContext()
© ABL - The Problem Solver 30
All hooks
 Basic hooks
 useState()
 useEffect()
 useContext()
 Additional Hooks
 useReducer()
 useLayoutEffect()
 useRef()
 useCallback()
 useMemo()
 useImperativeHandle()
 Custom hooks
 useDebugValue()
 Your custom hooks
© ABL - The Problem Solver 31
Custom
Hooks
© ABL - The Problem Solver 32
Custom
Hooks
© ABL - The Problem Solver 33
Using
The
Hook
© ABL - The Problem Solver 34
Rules
of
Hooks
© ABL - The Problem Solver 35
Rules
of
Hooks
© ABL - The Problem Solver 36
 Hooks can only be used in functional components
 Or in other hooks
 Not in class based components
 Hooks must always be created in the same order
 Must be outside loops, conditions or nested functions
 Hooks names must be prefixed with `use`
 There is an ESLint plugin to enforce these rules
Hooks are
optional
© ABL - The Problem Solver 37
Classes will
keep on
working
© ABL - The Problem Solver 38
Maurice de Beijer
@mauricedb
© ABL - The Problem Solver 39
1 of 39

Recommended

Why I am hooked on the future of React by
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
358 views36 slides
I am hooked on React by
I am hooked on ReactI am hooked on React
I am hooked on ReactMaurice De Beijer [MVP]
642 views37 slides
The new React by
The new React The new React
The new React Maurice De Beijer [MVP]
326 views66 slides
Better React state management with Redux by
Better React state management with ReduxBetter React state management with Redux
Better React state management with ReduxMaurice De Beijer [MVP]
632 views78 slides
Building large and scalable mission critical applications with React by
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactMaurice De Beijer [MVP]
196 views57 slides
Building Reliable Applications Using React, .NET & Azure by
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
152 views56 slides

More Related Content

Similar to Why I am hooked on the future of React

React suspense, not just for Alfred Hitchcock by
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockMaurice De Beijer [MVP]
163 views22 slides
Practice TypeScript Techniques Building React Server Components App by
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppMaurice De Beijer [MVP]
4 views79 slides
Building high-performance web applications with Preact by
Building high-performance web applications with PreactBuilding high-performance web applications with Preact
Building high-performance web applications with PreactMaurice De Beijer [MVP]
443 views38 slides
Ch06.ppt by
Ch06.pptCh06.ppt
Ch06.pptDeekshithaReddy63
12 views42 slides
Building high performance web applications by
Building high performance web applicationsBuilding high performance web applications
Building high performance web applicationsMaurice De Beijer [MVP]
342 views34 slides
Building high performance web applications by
Building high performance web applicationsBuilding high performance web applications
Building high performance web applicationsMaurice De Beijer [MVP]
266 views32 slides

Similar to Why I am hooked on the future of React(20)

Vertafore: Database Evaluation - Selecting Apache Cassandra by DataStax Academy
Vertafore: Database Evaluation - Selecting Apache CassandraVertafore: Database Evaluation - Selecting Apache Cassandra
Vertafore: Database Evaluation - Selecting Apache Cassandra
DataStax Academy494 views
Module 1: JavaScript Basics by Daniel McGhan
Module 1: JavaScript BasicsModule 1: JavaScript Basics
Module 1: JavaScript Basics
Daniel McGhan1.2K views
Continuous Performance Monitoring of a Distributed Application [CON4730] by Ashish Srivastava
Continuous Performance Monitoring of a Distributed Application [CON4730]Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]
Ashish Srivastava770 views
AngularJs Style Guide by Chiew Carol
AngularJs Style GuideAngularJs Style Guide
AngularJs Style Guide
Chiew Carol390 views
Introduction to JavaScript for APEX Developers - Module 1: JavaScript Basics by Daniel McGhan
Introduction to JavaScript for APEX Developers - Module 1: JavaScript BasicsIntroduction to JavaScript for APEX Developers - Module 1: JavaScript Basics
Introduction to JavaScript for APEX Developers - Module 1: JavaScript Basics
Daniel McGhan120 views
Sean Kenney - Solving Parallel Software Challenges with Patterns by iasaglobal
Sean Kenney - Solving Parallel Software Challenges with PatternsSean Kenney - Solving Parallel Software Challenges with Patterns
Sean Kenney - Solving Parallel Software Challenges with Patterns
iasaglobal555 views

More from Maurice De Beijer [MVP]

A foolproof Way to Estimate a Software Project by
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectMaurice De Beijer [MVP]
36 views40 slides
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress by
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
124 views33 slides
Build reliable Svelte applications using Cypress by
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
252 views26 slides
Building Reliable Applications Using React, .NET & Azure by
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
248 views63 slides
Concurrent Rendering Adventures in React 18 by
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Maurice De Beijer [MVP]
260 views72 slides
Why I am hooked on the future of React by
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
175 views44 slides

More from Maurice De Beijer [MVP](17)

Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress by Maurice De Beijer [MVP]
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress

Recently uploaded

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
225 views86 slides
Future of Learning - Khoong Chan Meng by
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan MengNUS-ISS
33 views7 slides
AI: mind, matter, meaning, metaphors, being, becoming, life values by
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life valuesTwain Liu 刘秋艳
35 views16 slides
Java Platform Approach 1.0 - Picnic Meetup by
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic MeetupRick Ossendrijver
25 views39 slides
How the World's Leading Independent Automotive Distributor is Reinventing Its... by
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...NUS-ISS
15 views25 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
27 views43 slides

Recently uploaded(20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views
Future of Learning - Khoong Chan Meng by NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS33 views
AI: mind, matter, meaning, metaphors, being, becoming, life values by Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier34 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst470 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV by Splunk
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
Splunk88 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs169 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet55 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS16 views

Why I am hooked on the future of React

Editor's Notes

  1. https://pixabay.com/nl/photos/mount-rushmore-beeldhouwkunst-3608620/
  2. https://pixabay.com/nl/photos/antelope-canyon-zandsteen-canyon-1128815/
  3. https://unsplash.com/photos/CrhsIRY3JWY
  4. https://pixabay.com/nl/illustrations/regels-boord-cirkel-lettertype-1752415/