SlideShare a Scribd company logo
React
What The Fu** Have I Done?!?
Who Are You?
Who Am I?
What & Why
● Involved in 6 React Projects
● Different React Usages
● My Mistakes
● A MUST know stuff to start
● Tips and Tools
Wrap Up
● Created by FB
● Community + Git
● Stuff from community
● A Javascript Library for
building user interfaces
● Component Based (JSX)
● Whatsup example
● Efficient rendering
Learn Once -> Write Anywhere
Component
State
Props
Lifecycle
Emoji Example
Thinking In React
4 Steps
● Component Structure
● Static code - codesandbox
● Minimal State
● State Responsibility
Component Structure
Single Responsibility Principle
Static code
Minimal State
Props vs State
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.
3. Can you compute it based on any other state or props in your
component? If so, it isn’t state.
State Responsibility
One way data flow through component
1. Identify every component that renders something based on that state.
2. Find a common owner component (a single component above all the
components that need the state in the hierarchy).
3. Either the common owner or another component higher up in the
hierarchy should own the state.
DOM
Document Object Model
● Browser have to parses the
HTML
● It removes the child element of
elementId
● Updates the DOM with the “New
Value”
● Re-calculate the CSS for the
parent and child
● Update the layout i.e. each
elements exact coordinates on
the screen
● Traverse the render tree and
paint it on the browser display
Virtual DOM
● Efficient diff algorithm
● Batched update operations
● Efficient update of sub tree only
● Uses observable instead of dirty
checking to detect change
● Angular dirty checking process
Virtual DOM 1. Re-render when state changed
2. Breadth First Search
3. Re-concilation
a. Different type
b. Hint from developer
(shouldComponentUpdate,
keys)
4. Batch update
Virtual DOM
Example
Virtual DOM
Example
Components
Types & Patterns
● Functional
● Pure
● Container (Smart Vs Dumb)
● HOC
Functional & Pure
Smart vs Dumb
Smart vs Dumb
HOC
Tips & Tools
● Client story - Creative-tim,
material-UI, NativeBase
● Open source - HumorMatch
● Create-react-app and more
by FB
Thank You!
Questions?
www.chenfeldman.com
chenfeldmn@gmail.com

More Related Content

PPTX
React more than just components
PDF
How we use Bottle and Elasticsearch
PPTX
Introduction to Reactjs
PDF
Build a Bot Workshop
PDF
Design patterns for fun & profit - CoderCruise 2018
PDF
TAO and the Essence of Modern JavaScript
PDF
Designing a json/rest api for your mobile app
PDF
kranonit S04E02 Кирил Jstor: Hacking .NET applications
React more than just components
How we use Bottle and Elasticsearch
Introduction to Reactjs
Build a Bot Workshop
Design patterns for fun & profit - CoderCruise 2018
TAO and the Essence of Modern JavaScript
Designing a json/rest api for your mobile app
kranonit S04E02 Кирил Jstor: Hacking .NET applications

What's hot (7)

PDF
Golang #5: To Go or not to Go
PDF
Angular2 vs React
PPTX
React native introduction (Mobile Warsaw)
PDF
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
PDF
Lesson 12
ODP
Successful Joomla migrations that don't hurt Search Engine Rankings
PDF
How to translate your Single Page Application - Webcamp 2016 (en)
Golang #5: To Go or not to Go
Angular2 vs React
React native introduction (Mobile Warsaw)
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
Lesson 12
Successful Joomla migrations that don't hurt Search Engine Rankings
How to translate your Single Page Application - Webcamp 2016 (en)
Ad

Similar to React learning in the hard way (20)

PDF
React - The JavaScript Library for User Interfaces
PPTX
Adding a modern twist to legacy web applications
PDF
Think components. March 2017
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PDF
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
PDF
GITS Class #20: Building A Fast and Responsive UI in React Native
PDF
Advanced Dagger talk from 360andev
PDF
Fundamental concepts of react js
PPTX
Introduction to react native with redux
PDF
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
PDF
React Native Firebase
PPTX
O365 Developer Bootcamp NJ 2018 - Material
PPTX
Hands on react native
PPTX
Why Concurrency is hard ?
PPTX
2.React tttttttttttttttttttttttttttttttt
PDF
Web Development with Delphi and React - ITDevCon 2016
PPTX
React workshop
PPTX
Presentation1
PDF
New c sharp4_features_part_v
PDF
DDD with Behat
React - The JavaScript Library for User Interfaces
Adding a modern twist to legacy web applications
Think components. March 2017
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
GITS Class #20: Building A Fast and Responsive UI in React Native
Advanced Dagger talk from 360andev
Fundamental concepts of react js
Introduction to react native with redux
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
React Native Firebase
O365 Developer Bootcamp NJ 2018 - Material
Hands on react native
Why Concurrency is hard ?
2.React tttttttttttttttttttttttttttttttt
Web Development with Delphi and React - ITDevCon 2016
React workshop
Presentation1
New c sharp4_features_part_v
DDD with Behat
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
MIND Revenue Release Quarter 2 2025 Press Release
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

React learning in the hard way