際際滷

際際滷Share a Scribd company logo
React,油Redux,
ES2015
React
Why油React?
Components
VirtualDOM
JSX
Components
Breaking UI into a compoent hierarchy is logical
They usually great at one thing
Components are highly reusable epecially in large apps
JSX is great for this
JSX JS
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
var HelloMessage = React.createClass({
displayName: "HelloMessage",
render: function render() {
return React.createElement(
"div",
null,
"Hello ",
this.props.name
);
}
});
VirtualDOM
E ciency
It has full event system
No direct DOM manipulations... Well you can manipulate DOM
directly if you want
Data油Flow油-油Flux
What油is油Flux?
Redux
What油is油Redux?
Is it Flux? Yes, and no
One store to rule them all.
Three principles of Redux make state mutations predictable and
reversable
Three油principles油of油Redux
1. Single source of truth
2. State is read-only
3. Mutations are written as pure functions - reducers
Redux油actions
{
type: MY_ACTION_TYPE,
// And here can be any data you need to transfer along with action
// If you need any
}
Reducers
Pure functions, that take action and state and return new state
State and Action ==> New State
Reducer油composition
It helps to split data handling logic, when each of reducers is
managing its own part of the global state
Redux provides util combineReducers() that makes it easy to use.
Store
Holds application state
Allows access to state
Allows state to be updated
Data油Flow
1. You call store.dispatch(action)
2. Redux store calls the root reducer
3. The Redux store saves state returned by the root reducer.
Middleware
It provides a third-party extension point between dispatching an
action, and the moment it reaches the reducer.
ES2015
Modules
Static module structure
Helps avoid global variables
Support for cyclic dependencies between modules
Class
Lambda油functions
New function creation syntax
Lexical binding
Has no 'arguments'
Examples
function () { return 1; }
() => { return 1; }
() => 1
function (a) { return a * 2; }
(a) => { return a * 2; }
(a) => a * 2
a => a * 2
function (a, b) { return a * b; }
(a, b) => { return a * b; }
(a, b) => a * b
function () { return arguments[0]; }
(...args) => args[0] // ES6 rest syntax helps to work without 'arguments'
() => {} // undefined
() => ({}) // {}
Spread油operator
Math.max(-1, 5, 11, 3) // 11
Math.max(...[-1, 5, 11, 3]) // 11
Math.max(-1, ...[5, 11], 3) // 11
// example from Tic Tac Toe React
// with ES6 spread operator
function getMaxElement(arr) {
return Math.max(...arr);
}
// without ES6 spread
function getMaxElement(arr) {
return Math.max.apply(null, arr);
}
Rest油operator
function f(x, ...y) {
揃揃揃
}
f('a', 'b', 'c'); // x = 'a'; y = ['b', 'c']
f(); // x = undefined; y = []
Destructuring
// Can work with objects
let {one, two} = {one: 1, two: 2} // one = 1, two = 2
// And arrays
let [,,x] = ['a', 'b', 'c', 'd']; // x = 'c'
// Is that it? Nope, array destructuring works with iterable objects
// Like strings
let [x,y] = 'abc'; // x='a'; y=['b', 'c']
// And Set
let [x, y] = new Set(['x', 'y']); // x = 'x', y = 'y'
// and etc.
// It's works great with rest operator
let [x,...y] = 'abc'; // x='a'; y=['b', 'c']
// And looks great in functions
function ([x, y, ...rest]) {...}
let,油const
let and const are block scoped
let and const don't get hoisted have TDZ (Temporal Dead Zone)
Variables de ned with let/const can't be de ned more than once
in the same scope
Template油strings
// Can contain multiline strings
let multiline = `line 1
line2`; // and spaces matter
let x = 1;
// Can evaluate variables, or expressions inside ${...}
let str = `${x + 41}` // str = '42'
// Can be tagged
function firstString(stringsArray, ...allValues) { // using the new ES6 rest syntax
// allValues is array of values passed inside ${}
return stringsArray[0];
}
let firstStr = firstString `Some text ${x} bla-bla`;
// firstStr = 'Some text ';
Async油stuff
Promises
Generators
ES7 Proposals
The油End
Useful links:
-
-
-
-
Why React?
Flux overview
Redux documentation
ES6 Overview
My email: maxim.petruck@lingvokot.com
Our organization on Github: github.com/Lingvokot

More Related Content

What's hot (20)

Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
Mohamed Yaser
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
Dr Sukhpal Singh Gill
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interview
Russell Childs
Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)
Asfand Hassan
Tut Constructor
Tut ConstructorTut Constructor
Tut Constructor
Kulachi Hansraj Model School Ashok Vihar
Interview C++11 code
Interview C++11 codeInterview C++11 code
Interview C++11 code
Russell Childs
Fighting null with memes
Fighting null with memesFighting null with memes
Fighting null with memes
Jarek Ratajski
Session06 handling xml data
Session06  handling xml dataSession06  handling xml data
Session06 handling xml data
kendyhuu
Lexical environment in ecma 262 5
Lexical environment in ecma 262 5Lexical environment in ecma 262 5
Lexical environment in ecma 262 5
Kim Hunmin
constructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objectsconstructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objects
Kanhaiya Saxena
Design patterns
Design patternsDesign patterns
Design patterns
Ba Tran
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
悴悋惺悸 悋惆愕 悋惠忰悸
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Dinesh Neupane
constructor and destructor
constructor and destructorconstructor and destructor
constructor and destructor
VENNILAV6
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
悴悋惺悸 悋惆愕 悋惠忰悸
Constructor and Destructor in c++
Constructor  and Destructor in c++Constructor  and Destructor in c++
Constructor and Destructor in c++
aleenaguen
Binary tree in java
Binary tree in javaBinary tree in java
Binary tree in java
Programming Homework Help
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
Alex Miller
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
PgDay.Seoul
Monadic Comprehensions and Functional Composition with Query Expressions
Monadic Comprehensions and Functional Composition with Query ExpressionsMonadic Comprehensions and Functional Composition with Query Expressions
Monadic Comprehensions and Functional Composition with Query Expressions
Chris Eargle
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interview
Russell Childs
Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)Oop lec 5-(class objects, constructor & destructor)
Oop lec 5-(class objects, constructor & destructor)
Asfand Hassan
Interview C++11 code
Interview C++11 codeInterview C++11 code
Interview C++11 code
Russell Childs
Fighting null with memes
Fighting null with memesFighting null with memes
Fighting null with memes
Jarek Ratajski
Session06 handling xml data
Session06  handling xml dataSession06  handling xml data
Session06 handling xml data
kendyhuu
Lexical environment in ecma 262 5
Lexical environment in ecma 262 5Lexical environment in ecma 262 5
Lexical environment in ecma 262 5
Kim Hunmin
constructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objectsconstructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objects
Kanhaiya Saxena
Design patterns
Design patternsDesign patterns
Design patterns
Ba Tran
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惘悋惡惺悸
悴悋惺悸 悋惆愕 悋惠忰悸
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Connecting and using PostgreSQL database with psycopg2 [Python 2.7]
Dinesh Neupane
constructor and destructor
constructor and destructorconstructor and destructor
constructor and destructor
VENNILAV6
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸愆惘忰 惘惘 悋惡惘悴悸 2   愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
愆惘忰 惘惘 悋惡惘悴悸 2 愃悸 悴悋悋 - 悋忰惆悸 悋惓悋惓悸
悴悋惺悸 悋惆愕 悋惠忰悸
Constructor and Destructor in c++
Constructor  and Destructor in c++Constructor  and Destructor in c++
Constructor and Destructor in c++
aleenaguen
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
Alex Miller
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
[Pgday.Seoul 2019] Citus襯 伎 覿 一危磯伎
PgDay.Seoul
Monadic Comprehensions and Functional Composition with Query Expressions
Monadic Comprehensions and Functional Composition with Query ExpressionsMonadic Comprehensions and Functional Composition with Query Expressions
Monadic Comprehensions and Functional Composition with Query Expressions
Chris Eargle

Similar to React, Redux, ES2015 by Max Petruck (20)

ECMAScript 6 and beyond
ECMAScript 6 and beyondECMAScript 6 and beyond
ECMAScript 6 and beyond
Francis Johny
ES6 Overview
ES6 OverviewES6 Overview
ES6 Overview
Bruno Scopelliti
Composition birds-and-recursion
Composition birds-and-recursionComposition birds-and-recursion
Composition birds-and-recursion
David Atchley
MiamiJS - The Future of JavaScript
MiamiJS - The Future of JavaScriptMiamiJS - The Future of JavaScript
MiamiJS - The Future of JavaScript
Caridy Patino
Javascript
JavascriptJavascript
Javascript
Vlad Ifrim
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scala
ehsoon
Pragmatic Real-World Scala
Pragmatic Real-World ScalaPragmatic Real-World Scala
Pragmatic Real-World Scala
parag978978
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
Jonas Bon辿r
Advanced JavaScript
Advanced JavaScript Advanced JavaScript
Advanced JavaScript
Zsolt M辿sz叩rovics
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
HODZoology3
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
Rafael Casuso Romate
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
Vikas Sharma
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
React/Redux
React/ReduxReact/Redux
React/Redux
Durgesh Vaishnav
TI1220 Lecture 6: First-class Functions
TI1220 Lecture 6: First-class FunctionsTI1220 Lecture 6: First-class Functions
TI1220 Lecture 6: First-class Functions
Eelco Visser
FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6
Dmitry Soshnikov
ES6 General Introduction
ES6 General IntroductionES6 General Introduction
ES6 General Introduction
Thomas Johnston
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascript
Boris Burdiliak
ES6: The Awesome Parts
ES6: The Awesome PartsES6: The Awesome Parts
ES6: The Awesome Parts
Domenic Denicola
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury
ECMAScript 6 and beyond
ECMAScript 6 and beyondECMAScript 6 and beyond
ECMAScript 6 and beyond
Francis Johny
Composition birds-and-recursion
Composition birds-and-recursionComposition birds-and-recursion
Composition birds-and-recursion
David Atchley
MiamiJS - The Future of JavaScript
MiamiJS - The Future of JavaScriptMiamiJS - The Future of JavaScript
MiamiJS - The Future of JavaScript
Caridy Patino
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scala
ehsoon
Pragmatic Real-World Scala
Pragmatic Real-World ScalaPragmatic Real-World Scala
Pragmatic Real-World Scala
parag978978
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
Jonas Bon辿r
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
HODZoology3
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
Rafael Casuso Romate
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
TI1220 Lecture 6: First-class Functions
TI1220 Lecture 6: First-class FunctionsTI1220 Lecture 6: First-class Functions
TI1220 Lecture 6: First-class Functions
Eelco Visser
FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6
Dmitry Soshnikov
ES6 General Introduction
ES6 General IntroductionES6 General Introduction
ES6 General Introduction
Thomas Johnston
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascript
Boris Burdiliak
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury

Recently uploaded (20)

SketchUp Pro Crack [2025]-Free Download?
SketchUp Pro Crack [2025]-Free Download?SketchUp Pro Crack [2025]-Free Download?
SketchUp Pro Crack [2025]-Free Download?
kiran10101khan
Adobe InDesign Crack Full Version Free Download 2025
Adobe InDesign Crack  Full Version Free Download 2025Adobe InDesign Crack  Full Version Free Download 2025
Adobe InDesign Crack Full Version Free Download 2025
sannnasaba545
Minitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free DownloadMinitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free Download
v3r2eptd2q
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
Alluxio, Inc.
Advance Website Helpdesk Customer Support Ticket Management Odoo
Advance Website Helpdesk Customer Support Ticket Management OdooAdvance Website Helpdesk Customer Support Ticket Management Odoo
Advance Website Helpdesk Customer Support Ticket Management Odoo
Aagam infotech
Cybersecurity & Innovation: The Future of Mobile App Development
Cybersecurity & Innovation: The Future of Mobile App DevelopmentCybersecurity & Innovation: The Future of Mobile App Development
Cybersecurity & Innovation: The Future of Mobile App Development
iProgrammer Solutions Private Limited
Enscape Latest 2025 Crack Free Download
Enscape Latest 2025  Crack Free DownloadEnscape Latest 2025  Crack Free Download
Enscape Latest 2025 Crack Free Download
rnzu5cxw0y
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Yann-Ga谷l Gu辿h辿neuc
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Shubham Joshi
Data Storytelling for Portfolio Leaders - Webinar
Data Storytelling for Portfolio Leaders - WebinarData Storytelling for Portfolio Leaders - Webinar
Data Storytelling for Portfolio Leaders - Webinar
OnePlan Solutions
Hire Odoo Developer OnestopDA Experts.
Hire Odoo Developer  OnestopDA Experts.Hire Odoo Developer  OnestopDA Experts.
Hire Odoo Developer OnestopDA Experts.
OnestopDA
SolidWorks 2025 Crack free Download updated
SolidWorks 2025 Crack  free Download updatedSolidWorks 2025 Crack  free Download updated
SolidWorks 2025 Crack free Download updated
sanasabaa73
EASEUS Partition Master Crack with License Code [Latest]
EASEUS Partition Master Crack with License Code [Latest]EASEUS Partition Master Crack with License Code [Latest]
EASEUS Partition Master Crack with License Code [Latest]
bhagasufyan
DevOpsDays LA - Platform Engineers are Product Managers.pdf
DevOpsDays LA - Platform Engineers are Product Managers.pdfDevOpsDays LA - Platform Engineers are Product Managers.pdf
DevOpsDays LA - Platform Engineers are Product Managers.pdf
Justin Reock
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen EngineRise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
stevebrudz1
AI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
AI/ML Infra Meetup | How Uber Optimizes LLM Training and FinetuneAI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
AI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
Alluxio, Inc.
OutSystems User Group Utrecht February 2025.pdf
OutSystems User Group Utrecht February 2025.pdfOutSystems User Group Utrecht February 2025.pdf
OutSystems User Group Utrecht February 2025.pdf
mail496323
Consequences and Principles of Software Quality v1.0
Consequences and Principles of Software Quality v1.0Consequences and Principles of Software Quality v1.0
Consequences and Principles of Software Quality v1.0
Yann-Ga谷l Gu辿h辿neuc
AI Agents and More:Build Your AI Assistans
AI Agents and More:Build Your AI AssistansAI Agents and More:Build Your AI Assistans
AI Agents and More:Build Your AI Assistans
HusseinMalikMammadli
Tenorshare 4uKey Crack Fre e Download
Tenorshare  4uKey  Crack  Fre e DownloadTenorshare  4uKey  Crack  Fre e Download
Tenorshare 4uKey Crack Fre e Download
oyv9tzurtx
SketchUp Pro Crack [2025]-Free Download?
SketchUp Pro Crack [2025]-Free Download?SketchUp Pro Crack [2025]-Free Download?
SketchUp Pro Crack [2025]-Free Download?
kiran10101khan
Adobe InDesign Crack Full Version Free Download 2025
Adobe InDesign Crack  Full Version Free Download 2025Adobe InDesign Crack  Full Version Free Download 2025
Adobe InDesign Crack Full Version Free Download 2025
sannnasaba545
Minitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free DownloadMinitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free Download
v3r2eptd2q
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
AI/ML Infra Meetup | Building Production Platform for Large-Scale Recommendat...
Alluxio, Inc.
Advance Website Helpdesk Customer Support Ticket Management Odoo
Advance Website Helpdesk Customer Support Ticket Management OdooAdvance Website Helpdesk Customer Support Ticket Management Odoo
Advance Website Helpdesk Customer Support Ticket Management Odoo
Aagam infotech
Enscape Latest 2025 Crack Free Download
Enscape Latest 2025  Crack Free DownloadEnscape Latest 2025  Crack Free Download
Enscape Latest 2025 Crack Free Download
rnzu5cxw0y
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Projects Panama, Valhalla, and Babylon: Java is the New Python v0.9
Yann-Ga谷l Gu辿h辿neuc
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Mastering Software Test Automation: A Comprehensive Guide for Beginners and E...
Shubham Joshi
Data Storytelling for Portfolio Leaders - Webinar
Data Storytelling for Portfolio Leaders - WebinarData Storytelling for Portfolio Leaders - Webinar
Data Storytelling for Portfolio Leaders - Webinar
OnePlan Solutions
Hire Odoo Developer OnestopDA Experts.
Hire Odoo Developer  OnestopDA Experts.Hire Odoo Developer  OnestopDA Experts.
Hire Odoo Developer OnestopDA Experts.
OnestopDA
SolidWorks 2025 Crack free Download updated
SolidWorks 2025 Crack  free Download updatedSolidWorks 2025 Crack  free Download updated
SolidWorks 2025 Crack free Download updated
sanasabaa73
EASEUS Partition Master Crack with License Code [Latest]
EASEUS Partition Master Crack with License Code [Latest]EASEUS Partition Master Crack with License Code [Latest]
EASEUS Partition Master Crack with License Code [Latest]
bhagasufyan
DevOpsDays LA - Platform Engineers are Product Managers.pdf
DevOpsDays LA - Platform Engineers are Product Managers.pdfDevOpsDays LA - Platform Engineers are Product Managers.pdf
DevOpsDays LA - Platform Engineers are Product Managers.pdf
Justin Reock
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen EngineRise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
Rise of the Phoenix: Lesson Learned Build an AI-powered Test Gen Engine
stevebrudz1
AI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
AI/ML Infra Meetup | How Uber Optimizes LLM Training and FinetuneAI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
AI/ML Infra Meetup | How Uber Optimizes LLM Training and Finetune
Alluxio, Inc.
OutSystems User Group Utrecht February 2025.pdf
OutSystems User Group Utrecht February 2025.pdfOutSystems User Group Utrecht February 2025.pdf
OutSystems User Group Utrecht February 2025.pdf
mail496323
Consequences and Principles of Software Quality v1.0
Consequences and Principles of Software Quality v1.0Consequences and Principles of Software Quality v1.0
Consequences and Principles of Software Quality v1.0
Yann-Ga谷l Gu辿h辿neuc
AI Agents and More:Build Your AI Assistans
AI Agents and More:Build Your AI AssistansAI Agents and More:Build Your AI Assistans
AI Agents and More:Build Your AI Assistans
HusseinMalikMammadli
Tenorshare 4uKey Crack Fre e Download
Tenorshare  4uKey  Crack  Fre e DownloadTenorshare  4uKey  Crack  Fre e Download
Tenorshare 4uKey Crack Fre e Download
oyv9tzurtx

React, Redux, ES2015 by Max Petruck

  • 4. Components Breaking UI into a compoent hierarchy is logical They usually great at one thing Components are highly reusable epecially in large apps JSX is great for this
  • 5. JSX JS var HelloMessage = React.createClass({ render: function() { return <div>Hello {this.props.name}</div>; } }); var HelloMessage = React.createClass({ displayName: "HelloMessage", render: function render() { return React.createElement( "div", null, "Hello ", this.props.name ); } });
  • 6. VirtualDOM E ciency It has full event system No direct DOM manipulations... Well you can manipulate DOM directly if you want
  • 10. What油is油Redux? Is it Flux? Yes, and no One store to rule them all. Three principles of Redux make state mutations predictable and reversable
  • 11. Three油principles油of油Redux 1. Single source of truth 2. State is read-only 3. Mutations are written as pure functions - reducers
  • 12. Redux油actions { type: MY_ACTION_TYPE, // And here can be any data you need to transfer along with action // If you need any }
  • 13. Reducers Pure functions, that take action and state and return new state State and Action ==> New State
  • 14. Reducer油composition It helps to split data handling logic, when each of reducers is managing its own part of the global state Redux provides util combineReducers() that makes it easy to use.
  • 15. Store Holds application state Allows access to state Allows state to be updated
  • 16. Data油Flow 1. You call store.dispatch(action) 2. Redux store calls the root reducer 3. The Redux store saves state returned by the root reducer.
  • 17. Middleware It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer.
  • 19. Modules Static module structure Helps avoid global variables Support for cyclic dependencies between modules
  • 20. Class
  • 21. Lambda油functions New function creation syntax Lexical binding Has no 'arguments'
  • 22. Examples function () { return 1; } () => { return 1; } () => 1 function (a) { return a * 2; } (a) => { return a * 2; } (a) => a * 2 a => a * 2 function (a, b) { return a * b; } (a, b) => { return a * b; } (a, b) => a * b function () { return arguments[0]; } (...args) => args[0] // ES6 rest syntax helps to work without 'arguments' () => {} // undefined () => ({}) // {}
  • 23. Spread油operator Math.max(-1, 5, 11, 3) // 11 Math.max(...[-1, 5, 11, 3]) // 11 Math.max(-1, ...[5, 11], 3) // 11 // example from Tic Tac Toe React // with ES6 spread operator function getMaxElement(arr) { return Math.max(...arr); } // without ES6 spread function getMaxElement(arr) { return Math.max.apply(null, arr); }
  • 24. Rest油operator function f(x, ...y) { 揃揃揃 } f('a', 'b', 'c'); // x = 'a'; y = ['b', 'c'] f(); // x = undefined; y = []
  • 25. Destructuring // Can work with objects let {one, two} = {one: 1, two: 2} // one = 1, two = 2 // And arrays let [,,x] = ['a', 'b', 'c', 'd']; // x = 'c' // Is that it? Nope, array destructuring works with iterable objects // Like strings let [x,y] = 'abc'; // x='a'; y=['b', 'c'] // And Set let [x, y] = new Set(['x', 'y']); // x = 'x', y = 'y' // and etc. // It's works great with rest operator let [x,...y] = 'abc'; // x='a'; y=['b', 'c'] // And looks great in functions function ([x, y, ...rest]) {...}
  • 26. let,油const let and const are block scoped let and const don't get hoisted have TDZ (Temporal Dead Zone) Variables de ned with let/const can't be de ned more than once in the same scope
  • 27. Template油strings // Can contain multiline strings let multiline = `line 1 line2`; // and spaces matter let x = 1; // Can evaluate variables, or expressions inside ${...} let str = `${x + 41}` // str = '42' // Can be tagged function firstString(stringsArray, ...allValues) { // using the new ES6 rest syntax // allValues is array of values passed inside ${} return stringsArray[0]; } let firstStr = firstString `Some text ${x} bla-bla`; // firstStr = 'Some text ';
  • 29. The油End Useful links: - - - - Why React? Flux overview Redux documentation ES6 Overview My email: maxim.petruck@lingvokot.com Our organization on Github: github.com/Lingvokot