SlideShare a Scribd company logo
1 of 15
$ whoami
blessing_edugie.ebowe
Software Developer @Andela
Introduction to sweet:) React
Scheme of Work
Scheme of Work
01. What is React.js?
02. What is JSX?
03. Our First Love:Component
04. Love is Complex:Complex Components
05. Love may/may not need Money:Data-Driven Components
• Something that you can use to build what you see on a webpage.
• React is a view layer library, that is not a framework like Angular.
• React is a declarative, efficient, interactive and flexible
JS library for building user interfaces.
https://reactjs.org/tutorial/tutorial.html#what-is-react
Difference btw framework & lib: you call lib. Framework calls you
What is React.js?
What is React.js 1
• Virtual DOM - tree of JavaScript objects that represents the actual DOM.
• Uses efficient diffing algorithms, in order to know what changed
• Updates subtrees of the DOM
• Faster DOM manipulation
• Unidirectional Data Flow - Data flows in one direction, separates data from DOM
• UI Components - Reusable, Readable and Interactive components
• JSX Sweetness - JavaScript eXtension, Allows for writing HTMLike JS
• React Native for Mobile
• React dev tools: React Chrome Extension
• BIG BACKING - Facebook
Why should I use React.js?
What is React.js 2
At the heart of all React applications
are components.
We write React components that
correspond
to interface elements.
We then organize these components
inside higher-level components which
define the structure of our application.
App -> ConverterBoxes -> SelectBox
Let’s talk React
• XML-like syntax for
generating component’s
HTML.
• Translates to plain JS
What is JSX?
What is JSX? 1
• React without JSX
• Transform JSX to React
function call using babel
• Self-contained reusable building blocks of an application
• They describe your UI at any point in time
• They are basically idempotent functions (same input same output)
• Created using React’s Component method
• Only required method is render, but has other lifeCycle Methods
• Inserted into the DOM using ReactDOM’s render method
Our First Love:Component
Our First Love:Component::Rendering and Creating
Love is Complex:Complex Components
Love is Complex:Complex Components::Rendering and Creating
• Props:
• Data passed down from parent component to child component
• Read Only
• Accessed via this.props(class/container component) or
props(presentational/functional component)
• State:
• Represents internal state of component
• Accessed via this.state(class/container component)
• When component’s state data changes, the rendered markup will be updated
by re-invoking the render method.
• Read and Write
Love may/may not need Money:Data Driven Component
Love may/may not need Money:Data-Driven
Components
Bonus: Using create-react-app
Bonus:Using create-react-app
• https://www.fullstackreact.com/30-days-of-react/
• https://babeljs.io/learn-es2015/
• https://reactjs.org/
• React Tutorial
• For JS/HTML/CSS https://www.w3schools.com/
Follow up materials
Follow up
materials
Thank You

More Related Content

What's hot

Basic React Knowledge.
Basic React Knowledge.Basic React Knowledge.
Basic React Knowledge.jacobryne
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overviewukdpe
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivityireneconje
 
Bezlio - Server Administration and Security
Bezlio - Server Administration and SecurityBezlio - Server Administration and Security
Bezlio - Server Administration and SecurityEli Remington
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008Hossein Zahed
 
Entity framework introduction sesion-1
Entity framework introduction   sesion-1Entity framework introduction   sesion-1
Entity framework introduction sesion-1Usama Nada
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generationEleonora Ciceri
 
Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Fwdays
 
Ajax enabled rich internet applications with xml and json
Ajax enabled rich internet applications with xml and jsonAjax enabled rich internet applications with xml and json
Ajax enabled rich internet applications with xml and jsonArchanaMani2
 
State management in react applications (Statecharts)
State management in react applications (Statecharts)State management in react applications (Statecharts)
State management in react applications (Statecharts)Tomáš Drenčák
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescriptTayseer_Emam
 
iOS Beginners Lesson 3
iOS Beginners Lesson 3iOS Beginners Lesson 3
iOS Beginners Lesson 3Calvin Cheng
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Yuriy Shapovalov
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1John F. Holliday
 

What's hot (20)

Basic React Knowledge.
Basic React Knowledge.Basic React Knowledge.
Basic React Knowledge.
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
 
Bezlio - Server Administration and Security
Bezlio - Server Administration and SecurityBezlio - Server Administration and Security
Bezlio - Server Administration and Security
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008
 
Entity framework introduction sesion-1
Entity framework introduction   sesion-1Entity framework introduction   sesion-1
Entity framework introduction sesion-1
 
003. ReactJS basic
003. ReactJS basic003. ReactJS basic
003. ReactJS basic
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
 
Dynamic content generation
Dynamic content generationDynamic content generation
Dynamic content generation
 
Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API"
 
Ajax enabled rich internet applications with xml and json
Ajax enabled rich internet applications with xml and jsonAjax enabled rich internet applications with xml and json
Ajax enabled rich internet applications with xml and json
 
State management in react applications (Statecharts)
State management in react applications (Statecharts)State management in react applications (Statecharts)
State management in react applications (Statecharts)
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescript
 
iOS Beginners Lesson 3
iOS Beginners Lesson 3iOS Beginners Lesson 3
iOS Beginners Lesson 3
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Jdbc new
Jdbc newJdbc new
Jdbc new
 
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 

Similar to Introduction to React by Ebowe Blessing

Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptxSHAIKIRFAN715544
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxSHAIKIRFAN715544
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = JoyJohn Need
 
Getting started with react & redux
Getting started with react & reduxGetting started with react & redux
Getting started with react & reduxGirish Talekar
 
What are the components in React?
What are the components in React?What are the components in React?
What are the components in React?BOSC Tech Labs
 
React JS Interview Question & Answer
React JS Interview Question & AnswerReact JS Interview Question & Answer
React JS Interview Question & AnswerMildain Solutions
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to ReactAustin Garrod
 
The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.Wikiance
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Marco Breveglieri
 
Learning React - I
Learning React - ILearning React - I
Learning React - IMitch Chen
 
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
 
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
 

Similar to Introduction to React by Ebowe Blessing (20)

Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
reactJS
reactJSreactJS
reactJS
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
React js
React jsReact js
React js
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = Joy
 
Getting started with react & redux
Getting started with react & reduxGetting started with react & redux
Getting started with react & redux
 
What are the components in React?
What are the components in React?What are the components in React?
What are the components in React?
 
React JS Interview Question & Answer
React JS Interview Question & AnswerReact JS Interview Question & Answer
React JS Interview Question & Answer
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
Learning React - I
Learning React - ILearning React - I
Learning React - I
 
Copy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdfCopy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdf
 
REACTJS1.ppsx
REACTJS1.ppsxREACTJS1.ppsx
REACTJS1.ppsx
 
Reactjs
Reactjs Reactjs
Reactjs
 
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
 
React-JS.pptx
React-JS.pptxReact-JS.pptx
React-JS.pptx
 
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
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Introduction to React by Ebowe Blessing

  • 1.
  • 2. $ whoami blessing_edugie.ebowe Software Developer @Andela Introduction to sweet:) React
  • 3. Scheme of Work Scheme of Work 01. What is React.js? 02. What is JSX? 03. Our First Love:Component 04. Love is Complex:Complex Components 05. Love may/may not need Money:Data-Driven Components
  • 4. • Something that you can use to build what you see on a webpage. • React is a view layer library, that is not a framework like Angular. • React is a declarative, efficient, interactive and flexible JS library for building user interfaces. https://reactjs.org/tutorial/tutorial.html#what-is-react Difference btw framework & lib: you call lib. Framework calls you What is React.js? What is React.js 1
  • 5. • Virtual DOM - tree of JavaScript objects that represents the actual DOM. • Uses efficient diffing algorithms, in order to know what changed • Updates subtrees of the DOM • Faster DOM manipulation • Unidirectional Data Flow - Data flows in one direction, separates data from DOM • UI Components - Reusable, Readable and Interactive components • JSX Sweetness - JavaScript eXtension, Allows for writing HTMLike JS • React Native for Mobile • React dev tools: React Chrome Extension • BIG BACKING - Facebook Why should I use React.js? What is React.js 2
  • 6. At the heart of all React applications are components. We write React components that correspond to interface elements. We then organize these components inside higher-level components which define the structure of our application. App -> ConverterBoxes -> SelectBox Let’s talk React
  • 7. • XML-like syntax for generating component’s HTML. • Translates to plain JS What is JSX? What is JSX? 1 • React without JSX • Transform JSX to React function call using babel
  • 8. • Self-contained reusable building blocks of an application • They describe your UI at any point in time • They are basically idempotent functions (same input same output) • Created using React’s Component method • Only required method is render, but has other lifeCycle Methods • Inserted into the DOM using ReactDOM’s render method Our First Love:Component Our First Love:Component::Rendering and Creating
  • 9. Love is Complex:Complex Components Love is Complex:Complex Components::Rendering and Creating
  • 10. • Props: • Data passed down from parent component to child component • Read Only • Accessed via this.props(class/container component) or props(presentational/functional component) • State: • Represents internal state of component • Accessed via this.state(class/container component) • When component’s state data changes, the rendered markup will be updated by re-invoking the render method. • Read and Write Love may/may not need Money:Data Driven Component Love may/may not need Money:Data-Driven Components
  • 12. • https://www.fullstackreact.com/30-days-of-react/ • https://babeljs.io/learn-es2015/ • https://reactjs.org/ • React Tutorial • For JS/HTML/CSS https://www.w3schools.com/ Follow up materials Follow up materials
  • 13.
  • 14.