ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Reactjs,Redux,AntD and Umi js
By:Isuru Samaraweera
Agenda
¡ñ Introduction to Reactjs and Ant Design
¡ñ Key constituents of ReactJs
¡ñ Introduction to Redux
¡ñ State management with Redux
¨C Actions
¨C Reducers
¨C Effects,Generators
¡ñ Umi js as a UI framework
What is ReactJs
¡ñ API to develop User Interfaces
¨C View on MVC
¨C One way binding
¨C Reusable components
¨C Responsive
¨C React js vs React native
¡ñ Client base
¨C Facebook,Microsoft
¨C Netflix,Uber
¨C Espn,Wallmart
¨C BBC,Atalassian and more
Ant Design¡ñ Ant Design
¨C An Enterprise-class UI design language
¨C https://ant.design/
¡ñ Ant Design of React
¨C UI components out of the box, based on React.
¨C http://react-component.github.io/badgeboard/
¡ñ Ant Design Pro
¨C An out-of-box UI solution for enterprise applications
¨C Umijs(react,redux dva,jest,mockapi)+antD react components
¨C https://pro.ant.design/
¡ñ Ant Design Mobile
¨C Mobile UI specification and React implementation.
¨C https://mobile.ant.design/
Main React constituents
¡ñ Virtual Dom
¡ñ JSX
¡ñ Props/PropTypes
¡ñ States
¡ñ LifeCycle
Virtual Dom
¡ñ
¡ñ
JSX
¡ñ Write code that looks like HTML
¡ñ
¡ñ
¡ñ Make large trees easier to read
¡ñ JSX Preprocessor
¨C converts JSX to javascript
¡ñ Babel
¨C a transpiler that turns code to be compatible with
older browser
¡ñ Webpack
¨C Build tool/Auto refresh/Bundler
Props,proptypes and state
¡ñ Props
¨C pass parameters from parents to children components
¡ñ static propTypes = {
incrementBy: PropTypes.number,
};
¨C Bool,number,string,func,array etc
¡ñ <Hello incrementBy={1}/>
¨C this.props.incrementBy
¨C Props are immutable
¡ñ State
¨C To manage state I e respond to user input
¨C SetState to update currentstate to next state
¨C Rerender on state change
Reactjs Life cycle
¡ñ 2 Major types
¨C Will methods¡ªCalled right before something
happens
¨C Did methods¡ªCalled right after something happens
¡ñ Based on phase of life cycle
¨C Initialization¡ªWhen a component class is being
instantiated.
¨C Mounting¡ªA component is being inserted into the
DOM.
¨C Updating¡ªA component is being updated with new
data via state or props.
¨C Unmounting¡ªA component is being removed from
the DOM.
React Redux AntD and Umi js
componentwillreceiveprops
<Component value={15} />
Redux
¡ñ Provide State management layer for React.
¡ñ Store
¨C Holds all application state in a single state tree
¨C Updated only with actions
¨C An object describing an event.
¡ñ Reducers to transform application state
Actions and reducers
¡ñ Javascript obect representing event
{type: 'CREATE_POST',
payload: {
body: 'This is body'
}}
¡ñ
Connect to redux store
¡ñ import { connect } from 'react-redux';
¡ñ class App extends Component {
¡ñ render() {
¡ñ return (
¡ñ <div className="main-content">
¡ñ <TasksPage tasks={this.props.tasks} />
¡ñ </div>);}}
¡ñ function mapStateToProps(state) {
¡ñ return {tasks: state.tasks}}
¡ñ export default connect(mapStateToProps)(App);
Asynchronous calls
Generators
¡ñ Functions
¨C Can be paused and resumed
¨C Handle complex async events efficiently
¨C Prevent call back hell
¡ñ function* count() {
¡ñ yield 1;
¡ñ yield 2;
¡ñ yield 3;
¡ñ }
¡ñ Const iterator = count()
¡ñ Iteraor.next()=>{ value: 1, done: false }
¡ñ Iteraor.next()=>{ value: 2, done: false }
¡ñ Iteraor.next()=>{ value: 3, done: false }
¡ñ Iteraor.next()=>{ value: undefined, done: true }
Redux Saga Effects
¡ñ function* fetchTasks() {
¡ñ try {
¡ñ const { data } = yield call(api.fetchTasks);
¡ñ yield put({
¡ñ type: 'FETCH_TASKS_SUCCEEDED',
¡ñ payload: { tasks: data },
¡ñ });
¡ñ } catch (e) {
¡ñ yield put({
¡ñ type: 'FETCH_TASKS_FAILED',
¡ñ payload: { error: e.message },
¡ñ });}}
Umi js Dva based State
management
¡ñ Sessionstorage
¡ñ Localstorage
React Redux AntD and Umi js
Ad

Recommended

PPTX
DiSC Personality Profiles
Eileen Carelock
?
PPTX
Disc Intro for teambuild
Brent Green
?
PDF
Agile Mindset : The Paradigm Shift..! - Agile Tour Algiers 2017
Taoufik Fekhar
?
PDF
Atelier d'¨¦quipe des attentes mutuelles
Alexandre Quach
?
PPTX
David Marquet on Leadership and Community
CMX
?
PDF
DISC Id - The Influencer
Crystal
?
PPTX
Presenting with impact
Mark Reed
?
PDF
Como Analista de Negocio Interage com as Pr¨¢ticas da ITIL
Rildo (@rildosan) Santos
?
PDF
Stop Retrospective, Start Continuous Improving
Jen-Chieh Ko
?
PPTX
Metas objetivos ageis
Mariana Zaparolli Martins
?
PDF
Administra??o eficaz do tempo
danielcosta2013
?
PDF
Design System as a Product
Thoughtworks
?
PDF
Modern Professional Scrum using Flow and Kanban - Agile and Beyond Detroit 2019
Yuval Yeret
?
PPTX
Psychological Safety Within Your Team
Smith School of Business, Queen's University
?
PPTX
DevOps Kaizen: Practical Steps to Start & Sustain a Transformation
dev2ops
?
PDF
Tech City: How London became a tech power hub
Toby Allen
?
PDF
Aula 04 Identificando Oportunidades (empreendedorismo)
RafaelaMalerba
?
PPSX
7 Wastes of Software Development
Sunil Bajari
?
PPTX
Agile Mindset Shifting: Agile For All
India Scrum Enthusiasts Community
?
PDF
??????? ???? 4??! 3??? ??? ???? ??? ?????!
Minsung Park
?
PPTX
§²§Ú§ã§Ü§Ú §Ó §ä§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§Ú
ISsoft
?
PPTX
Agile Leaders and Agile Managers
Luca Sturaro
?
PDF
React js
Rajesh Kolla
?
PPTX
React JS Interview Question & Answer
Mildain Solutions
?
PPTX
Getting started with react &amp; redux
Girish Talekar
?
PPTX
ReactJS (1)
George Tony
?
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
?
PPTX
React/Redux
Durgesh Vaishnav
?
PDF
The Road To Redux
Jeffrey Sanchez
?
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
?

More Related Content

What's hot (14)

PDF
Stop Retrospective, Start Continuous Improving
Jen-Chieh Ko
?
PPTX
Metas objetivos ageis
Mariana Zaparolli Martins
?
PDF
Administra??o eficaz do tempo
danielcosta2013
?
PDF
Design System as a Product
Thoughtworks
?
PDF
Modern Professional Scrum using Flow and Kanban - Agile and Beyond Detroit 2019
Yuval Yeret
?
PPTX
Psychological Safety Within Your Team
Smith School of Business, Queen's University
?
PPTX
DevOps Kaizen: Practical Steps to Start & Sustain a Transformation
dev2ops
?
PDF
Tech City: How London became a tech power hub
Toby Allen
?
PDF
Aula 04 Identificando Oportunidades (empreendedorismo)
RafaelaMalerba
?
PPSX
7 Wastes of Software Development
Sunil Bajari
?
PPTX
Agile Mindset Shifting: Agile For All
India Scrum Enthusiasts Community
?
PDF
??????? ???? 4??! 3??? ??? ???? ??? ?????!
Minsung Park
?
PPTX
§²§Ú§ã§Ü§Ú §Ó §ä§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§Ú
ISsoft
?
PPTX
Agile Leaders and Agile Managers
Luca Sturaro
?
Stop Retrospective, Start Continuous Improving
Jen-Chieh Ko
?
Metas objetivos ageis
Mariana Zaparolli Martins
?
Administra??o eficaz do tempo
danielcosta2013
?
Design System as a Product
Thoughtworks
?
Modern Professional Scrum using Flow and Kanban - Agile and Beyond Detroit 2019
Yuval Yeret
?
Psychological Safety Within Your Team
Smith School of Business, Queen's University
?
DevOps Kaizen: Practical Steps to Start & Sustain a Transformation
dev2ops
?
Tech City: How London became a tech power hub
Toby Allen
?
Aula 04 Identificando Oportunidades (empreendedorismo)
RafaelaMalerba
?
7 Wastes of Software Development
Sunil Bajari
?
Agile Mindset Shifting: Agile For All
India Scrum Enthusiasts Community
?
??????? ???? 4??! 3??? ??? ???? ??? ?????!
Minsung Park
?
§²§Ú§ã§Ü§Ú §Ó §ä§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§Ú
ISsoft
?
Agile Leaders and Agile Managers
Luca Sturaro
?

Similar to React Redux AntD and Umi js (20)

PDF
React js
Rajesh Kolla
?
PPTX
React JS Interview Question & Answer
Mildain Solutions
?
PPTX
Getting started with react &amp; redux
Girish Talekar
?
PPTX
ReactJS (1)
George Tony
?
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
?
PPTX
React/Redux
Durgesh Vaishnav
?
PDF
The Road To Redux
Jeffrey Sanchez
?
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
?
PPTX
React JS - A quick introduction tutorial
Mohammed Fazuluddin
?
PPTX
Presentation on "An Introduction to ReactJS"
Flipkart
?
PDF
Fundamental concepts of react js
StephieJohn
?
PDF
A React Journey
LinkMe Srl
?
PPTX
Dyanaimcs of business and economics unit 2
jpm071712
?
PDF
REACTJS.pdf
ArthyR3
?
PPTX
Better web apps with React and Redux
Ali Sa'o
?
PDF
Welcome to React & Flux !
Ritesh Kumar
?
PPTX
Introduction to react and redux
Cuong Ho
?
PDF
Using React, Redux and Saga with Lottoland APIs
Mihail Gaberov
?
PPTX
[Final] ReactJS presentation
ºé Åô·¢
?
PDF
Corso su ReactJS
LinkMe Srl
?
React js
Rajesh Kolla
?
React JS Interview Question & Answer
Mildain Solutions
?
Getting started with react &amp; redux
Girish Talekar
?
ReactJS (1)
George Tony
?
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
?
React/Redux
Durgesh Vaishnav
?
The Road To Redux
Jeffrey Sanchez
?
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
?
React JS - A quick introduction tutorial
Mohammed Fazuluddin
?
Presentation on "An Introduction to ReactJS"
Flipkart
?
Fundamental concepts of react js
StephieJohn
?
A React Journey
LinkMe Srl
?
Dyanaimcs of business and economics unit 2
jpm071712
?
REACTJS.pdf
ArthyR3
?
Better web apps with React and Redux
Ali Sa'o
?
Welcome to React & Flux !
Ritesh Kumar
?
Introduction to react and redux
Cuong Ho
?
Using React, Redux and Saga with Lottoland APIs
Mihail Gaberov
?
[Final] ReactJS presentation
ºé Åô·¢
?
Corso su ReactJS
LinkMe Srl
?
Ad

More from Isuru Samaraweera (6)

ODP
Full Text Search in Couchbase
Isuru Samaraweera
?
PDF
Web security and OWASP
Isuru Samaraweera
?
PPTX
Exploring Streams and Lambdas in Java8
Isuru Samaraweera
?
PPTX
Java8lambda
Isuru Samaraweera
?
PPT
Groovy unleashed
Isuru Samaraweera
?
PDF
Introductionto fp with groovy
Isuru Samaraweera
?
Full Text Search in Couchbase
Isuru Samaraweera
?
Web security and OWASP
Isuru Samaraweera
?
Exploring Streams and Lambdas in Java8
Isuru Samaraweera
?
Java8lambda
Isuru Samaraweera
?
Groovy unleashed
Isuru Samaraweera
?
Introductionto fp with groovy
Isuru Samaraweera
?
Ad

Recently uploaded (20)

PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
?
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
?
PPT
????? ???? ????? ??? ?? ???? ??? ???????
???? ??? ?????
?
PPTX
Introduction to Python Programming Language
merlinjohnsy
?
PPTX
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
?
PDF
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
?
PPTX
Work at Height training for workers .pptx
cecos12
?
PDF
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
?
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
?
PDF
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
?
PDF
lesson4-occupationalsafetyandhealthohsstandards-240812020130-1a7246d0.pdf
arvingallosa3
?
PDF
Decision support system in machine learning models for a face recognition-bas...
TELKOMNIKA JOURNAL
?
PPTX
Mobile database systems 20254545645.pptx
herosh1968
?
PDF
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
?
PDF
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
?
PDF
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Diego L¨®pez-de-Ipi?a Gonz¨¢lez-de-Artaza
?
PDF
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
?
PPTX
Precooling and Refrigerated storage.pptx
ThongamSunita
?
PDF
PRIZ Academy - Process functional modelling
PRIZ Guru
?
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
?
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
?
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
?
????? ???? ????? ??? ?? ???? ??? ???????
???? ??? ?????
?
Introduction to Python Programming Language
merlinjohnsy
?
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
?
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
?
Work at Height training for workers .pptx
cecos12
?
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
?
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
?
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
?
lesson4-occupationalsafetyandhealthohsstandards-240812020130-1a7246d0.pdf
arvingallosa3
?
Decision support system in machine learning models for a face recognition-bas...
TELKOMNIKA JOURNAL
?
Mobile database systems 20254545645.pptx
herosh1968
?
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
?
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
?
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Diego L¨®pez-de-Ipi?a Gonz¨¢lez-de-Artaza
?
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
?
Precooling and Refrigerated storage.pptx
ThongamSunita
?
PRIZ Academy - Process functional modelling
PRIZ Guru
?
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
?

React Redux AntD and Umi js

  • 1. Reactjs,Redux,AntD and Umi js By:Isuru Samaraweera
  • 2. Agenda ¡ñ Introduction to Reactjs and Ant Design ¡ñ Key constituents of ReactJs ¡ñ Introduction to Redux ¡ñ State management with Redux ¨C Actions ¨C Reducers ¨C Effects,Generators ¡ñ Umi js as a UI framework
  • 3. What is ReactJs ¡ñ API to develop User Interfaces ¨C View on MVC ¨C One way binding ¨C Reusable components ¨C Responsive ¨C React js vs React native ¡ñ Client base ¨C Facebook,Microsoft ¨C Netflix,Uber ¨C Espn,Wallmart ¨C BBC,Atalassian and more
  • 4. Ant Design¡ñ Ant Design ¨C An Enterprise-class UI design language ¨C https://ant.design/ ¡ñ Ant Design of React ¨C UI components out of the box, based on React. ¨C http://react-component.github.io/badgeboard/ ¡ñ Ant Design Pro ¨C An out-of-box UI solution for enterprise applications ¨C Umijs(react,redux dva,jest,mockapi)+antD react components ¨C https://pro.ant.design/ ¡ñ Ant Design Mobile ¨C Mobile UI specification and React implementation. ¨C https://mobile.ant.design/
  • 5. Main React constituents ¡ñ Virtual Dom ¡ñ JSX ¡ñ Props/PropTypes ¡ñ States ¡ñ LifeCycle
  • 7. JSX ¡ñ Write code that looks like HTML ¡ñ ¡ñ ¡ñ Make large trees easier to read ¡ñ JSX Preprocessor ¨C converts JSX to javascript ¡ñ Babel ¨C a transpiler that turns code to be compatible with older browser ¡ñ Webpack ¨C Build tool/Auto refresh/Bundler
  • 8. Props,proptypes and state ¡ñ Props ¨C pass parameters from parents to children components ¡ñ static propTypes = { incrementBy: PropTypes.number, }; ¨C Bool,number,string,func,array etc ¡ñ <Hello incrementBy={1}/> ¨C this.props.incrementBy ¨C Props are immutable ¡ñ State ¨C To manage state I e respond to user input ¨C SetState to update currentstate to next state ¨C Rerender on state change
  • 9. Reactjs Life cycle ¡ñ 2 Major types ¨C Will methods¡ªCalled right before something happens ¨C Did methods¡ªCalled right after something happens ¡ñ Based on phase of life cycle ¨C Initialization¡ªWhen a component class is being instantiated. ¨C Mounting¡ªA component is being inserted into the DOM. ¨C Updating¡ªA component is being updated with new data via state or props. ¨C Unmounting¡ªA component is being removed from the DOM.
  • 12. Redux ¡ñ Provide State management layer for React. ¡ñ Store ¨C Holds all application state in a single state tree ¨C Updated only with actions ¨C An object describing an event. ¡ñ Reducers to transform application state
  • 13. Actions and reducers ¡ñ Javascript obect representing event {type: 'CREATE_POST', payload: { body: 'This is body' }} ¡ñ
  • 14. Connect to redux store ¡ñ import { connect } from 'react-redux'; ¡ñ class App extends Component { ¡ñ render() { ¡ñ return ( ¡ñ <div className="main-content"> ¡ñ <TasksPage tasks={this.props.tasks} /> ¡ñ </div>);}} ¡ñ function mapStateToProps(state) { ¡ñ return {tasks: state.tasks}} ¡ñ export default connect(mapStateToProps)(App);
  • 16. Generators ¡ñ Functions ¨C Can be paused and resumed ¨C Handle complex async events efficiently ¨C Prevent call back hell ¡ñ function* count() { ¡ñ yield 1; ¡ñ yield 2; ¡ñ yield 3; ¡ñ } ¡ñ Const iterator = count() ¡ñ Iteraor.next()=>{ value: 1, done: false } ¡ñ Iteraor.next()=>{ value: 2, done: false } ¡ñ Iteraor.next()=>{ value: 3, done: false } ¡ñ Iteraor.next()=>{ value: undefined, done: true }
  • 18. ¡ñ function* fetchTasks() { ¡ñ try { ¡ñ const { data } = yield call(api.fetchTasks); ¡ñ yield put({ ¡ñ type: 'FETCH_TASKS_SUCCEEDED', ¡ñ payload: { tasks: data }, ¡ñ }); ¡ñ } catch (e) { ¡ñ yield put({ ¡ñ type: 'FETCH_TASKS_FAILED', ¡ñ payload: { error: e.message }, ¡ñ });}}
  • 19. Umi js Dva based State management ¡ñ Sessionstorage ¡ñ Localstorage