SlideShare a Scribd company logo
React
What is React?
React is a JS library for rendering web pages.
That’s it.
The closest equivalent is angular with only directives
without the other features such as services,
controllers etc.
So why use it?
React is fast
Development best practices
React native
Server rendering.
Easy to grasp
Huge ecosystem
The React way - 4 principles of
developing react applications
1. Break the UI to components
2. Keep unidirectional data ow.
3. Identify the UI state.
4. Dispatch actions to change the state.
Break to little components
JSX
JSX is a syntactic sugar for function calls and object
construction
Instead of this:
React.createElement(
a,
{href:"spectory.com"},
'Spectory website’'
)
We can write:
<a href=”spectory.com”>Spectory website</a>
JSX
It is very similar to HTML, and it lets us integrate JS
code inside with curly braces:
class HelloPage extends Component {
render() {
let userName = 'amitai';
return (
<div>
<h1>Hello, {userName}, today is
{(new Date()).toDateString()}
</h1>
</div>
);
}
}
Children in JSX
Children is a unique prop in react
Created automatically when the component has
child elements.
Lets the parent component change the state or the
context of its children
Reminds ng-transclude in angular
Dumb and smart components
Smart Dumb
Inherit react
component
simple function
Describe how things
work
Describe how things look
Provide no DOM
markup or styles
Have no app dependencies
Provide data, do
data fetching
Receive only props,
providing data and callbacks
Call redux actions Rarely have own state
The default type of the component will be “dumb”
unless there is a need to upgrade it.
Redux
Redux is a set of libraries that simpli ed Flux.
Actions - action is a function that the application
uses to send data to the store.
Reducers - The reducers takes the data from the
action and inserts it into the state.
Store - the store has few responsibilities:
- Holds the state of the application, and expose it.
- Dispatches actions.
- Subscribes listeners on state changes events.
Redux data ow
Redux rules:
The reducer is a pure function that receives an
action and a state and returns new state.
Any action has case that manipulate the state.
The state is immutable
De ne "default" that will return the state.
Use default parameter in order to init our state.
The application state structure
It should be designed to serve the application
functionality
Before you add object to the state, stop, and think.
Keep it small and simple as possible.
You can manipulate this state before transferring
it to the props
Do not keep duplications or redundant data.
Treat it like you treat the database tables
Redux state vs local state
As a rule we do not want to use setState
The only exceptions are when the state is local and
is not related to the application
Debugging tools:
React Developer Tools
View the component ands it children.
View the state and props of the component.
View the component’s events.
Redux DevTools:
A must have for developing in redux
View actions
View the application state
Conclusion
React is the most popular framework right now.
It’s easy to learn and master.
IMO every web developer should learn it because
it is here to stay.
It is back by a large company that pushes it and
improve it all the time
It is expanding to supportany type of UX.
It helps the developer to write better software
and become more professional.
References
https://facebook.github.io/react/
http://redux.js.org/
https://www.youtube.com/watch?
v=5oiXG9f6GO0&index=1&list=PLuNEz8XtB51K-
x3bwCC9uNM_cxXaiCcRY - Rem Zolotykh
https://app.pluralsight.com/library/courses/react-
redux-react-router-es6/ - Cory House

More Related Content

PPTX
React JS - A quick introduction tutorial
PPTX
reactJS
PPTX
React Hooks
PPTX
Introduction to react_js
PDF
Introduction to React JS
ODP
Introduction to ReactJS
PPTX
React workshop
PPTX
Introduction to React JS for beginners
React JS - A quick introduction tutorial
reactJS
React Hooks
Introduction to react_js
Introduction to React JS
Introduction to ReactJS
React workshop
Introduction to React JS for beginners

What's hot (20)

PDF
ReactJS presentation
PDF
React new features and intro to Hooks
PPTX
Introduction to React
PDF
PDF
React JS and why it's awesome
PPTX
Intro to React
PPTX
React + Redux Introduction
PDF
An Introduction to ReactJS
PPTX
React JS: A Secret Preview
PPTX
PDF
An Introduction to Redux
PDF
Workshop 21: React Router
PPTX
React js programming concept
PPTX
React.js - The Dawn of Virtual DOM
PPTX
React js for beginners
PPTX
React introduction
PDF
WEB DEVELOPMENT USING REACT JS
PPTX
Introduction to React JS
PPTX
React hooks
ReactJS presentation
React new features and intro to Hooks
Introduction to React
React JS and why it's awesome
Intro to React
React + Redux Introduction
An Introduction to ReactJS
React JS: A Secret Preview
An Introduction to Redux
Workshop 21: React Router
React js programming concept
React.js - The Dawn of Virtual DOM
React js for beginners
React introduction
WEB DEVELOPMENT USING REACT JS
Introduction to React JS
React hooks
Ad

Similar to React (20)

PDF
The Road To Redux
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
PPTX
Introduction to react and redux
PPTX
Presentation on "An Introduction to ReactJS"
PDF
Getting started with React and Redux
PDF
Getting Started with React, When You’re an Angular Developer
PDF
React Interview Question & Answers PDF By ScholarHat
PPTX
Reactjs notes.pptx for web development- tutorial and theory
PPTX
React_Complete.pptx
PDF
theory-slides-vueh3urh4ur4ur4r44oirj4riu4ri
PPTX
Getting started with react &amp; redux
PDF
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
PPTX
Presentation1
PPTX
Unit 2 Fundamentals of React -------.pptx
PDF
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
PPTX
PPTX
React/Redux
PPTX
PDF
react hook and wesite making structure ppt
The Road To Redux
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
Introduction to react and redux
Presentation on "An Introduction to ReactJS"
Getting started with React and Redux
Getting Started with React, When You’re an Angular Developer
React Interview Question & Answers PDF By ScholarHat
Reactjs notes.pptx for web development- tutorial and theory
React_Complete.pptx
theory-slides-vueh3urh4ur4ur4r44oirj4riu4ri
Getting started with react &amp; redux
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
Presentation1
Unit 2 Fundamentals of React -------.pptx
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
React/Redux
react hook and wesite making structure ppt
Ad

Recently uploaded (20)

PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administration Chapter 2
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
top salesforce developer skills in 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
ai tools demonstartion for schools and inter college
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
PTS Company Brochure 2025 (1).pdf.......
ISO 45001 Occupational Health and Safety Management System
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administration Chapter 2
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Nekopoi APK 2025 free lastest update
VVF-Customer-Presentation2025-Ver1.9.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
ai tools demonstartion for schools and inter college
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo POS Development Services by CandidRoot Solutions
PTS Company Brochure 2025 (1).pdf.......

React

  • 2. What is React? React is a JS library for rendering web pages. That’s it. The closest equivalent is angular with only directives without the other features such as services, controllers etc.
  • 3. So why use it? React is fast Development best practices React native Server rendering. Easy to grasp Huge ecosystem
  • 4. The React way - 4 principles of developing react applications 1. Break the UI to components 2. Keep unidirectional data ow. 3. Identify the UI state. 4. Dispatch actions to change the state.
  • 5. Break to little components
  • 6. JSX JSX is a syntactic sugar for function calls and object construction Instead of this: React.createElement( a, {href:"spectory.com"}, 'Spectory website’' ) We can write: <a href=”spectory.com”>Spectory website</a>
  • 7. JSX It is very similar to HTML, and it lets us integrate JS code inside with curly braces: class HelloPage extends Component { render() { let userName = 'amitai'; return ( <div> <h1>Hello, {userName}, today is {(new Date()).toDateString()} </h1> </div> ); } }
  • 8. Children in JSX Children is a unique prop in react Created automatically when the component has child elements. Lets the parent component change the state or the context of its children Reminds ng-transclude in angular
  • 9. Dumb and smart components Smart Dumb Inherit react component simple function Describe how things work Describe how things look Provide no DOM markup or styles Have no app dependencies Provide data, do data fetching Receive only props, providing data and callbacks Call redux actions Rarely have own state The default type of the component will be “dumb” unless there is a need to upgrade it.
  • 10. Redux Redux is a set of libraries that simpli ed Flux. Actions - action is a function that the application uses to send data to the store. Reducers - The reducers takes the data from the action and inserts it into the state. Store - the store has few responsibilities: - Holds the state of the application, and expose it. - Dispatches actions. - Subscribes listeners on state changes events.
  • 12. Redux rules: The reducer is a pure function that receives an action and a state and returns new state. Any action has case that manipulate the state. The state is immutable De ne "default" that will return the state. Use default parameter in order to init our state.
  • 13. The application state structure It should be designed to serve the application functionality Before you add object to the state, stop, and think. Keep it small and simple as possible. You can manipulate this state before transferring it to the props Do not keep duplications or redundant data. Treat it like you treat the database tables
  • 14. Redux state vs local state As a rule we do not want to use setState The only exceptions are when the state is local and is not related to the application
  • 15. Debugging tools: React Developer Tools View the component ands it children. View the state and props of the component. View the component’s events. Redux DevTools: A must have for developing in redux View actions View the application state
  • 16. Conclusion React is the most popular framework right now. It’s easy to learn and master. IMO every web developer should learn it because it is here to stay. It is back by a large company that pushes it and improve it all the time It is expanding to supportany type of UX. It helps the developer to write better software and become more professional.