Blank 2015-05-06
View ControllerModel
Ideas of Flux & ElmFacebook & Instagram
ES6 & ES7 magic
Maintain a consistent code style
Manage form Unit tests
https://github.com/erikras/react-redux-universal-hot-example
Redux DevTools Development
React Redux Official Binging
REACT
Virtual DOM
Data Flow
JSX
Component
APP
Virtual
DOM
DOM
Virtual
DOM
Next
State
View State
Table Row
Cell Cell Cell Cell
JSX (1/3)
• JSX (Almost like HTML)
• JS createElement (“TagName”, “Attribute”, “Child”)
• React Factories (Common HTML tag)
(Javascript XML)
JavaScrip
Factory
Need
Compile
JSX (2/3)
• Native HTML tag (Lower-case first letter)
• JSX DOM (Upper-case first letter)
• Reserved words (class => className, for => htmlFor, …)
• JavaScript expression & Comment
a - z first
A - Z first
Comment{Expression}
JSX (3/3)
• … (Spread attributes ES6) & Overwrite with order
• JSX Differences
• style accepts JavaScript object (camelCased properties)
• onChange event behaves as you would expect it to
• Form More here
style onChange Form
React? Redux?
VIRTUAL DOM
http://teropa.info/blog/2015/03/02/change-and-its-detection-in-javascript-frameworks.html
Hight
Performance
DATA FLOW
Initial data
User input
Network data
New data
ComponentSet State
Set Props
ComponentSet State
Set Props
Component Set State
Event
Callback
ComponentSet State
Set Props
Set
Again
One Way
Data Binging
Component
COMPONENT (1/2)
• props (Component property)
• External data from parent
• this.props read-only
• state (State machine)
• Internal data in component
• this.state to read
• this.setState() to update
State render
Change
JSX Component
props
immutable
mutable
Easy to
Unit Test
COMPONENT (2/2)
https://kunigami.wordpress.com/2015/04/28/react-js-introduction/
Life
Cycle
REDUX
Action Reducer Store View
Provider Connect
Action Dispatcher Store View
FLUX (OFFICIAL)
ACTIONS
• type action type
• payload action data
• Pure function
Pure function Impure function
Always same output
with same input
May different output
with same input
Never side-effects May side-effects
Never alter state May alter state global
Action
JavaScript
Object
Call Rest
Api
Periodic
Update
REDUCERS
• (oldState, action) => newState (When state tree update)
• object spread (Ensure new object)
Reducer
New
State
Action
Pure function, too
reduce into
current state
STORE
• Maintain state tree
• getState() to get state
• dispatch() to sent action & alter state
• subscribe() to get callback function & listening to state update
Reducer
Action
Store
dispatch()
createStore()
DATA FLOW
Call store.dispatch(action)
Action trigger root reducer
• reducer(state, action)
• return new state
Store save return state tree
• Call all store.subscribe(listener)
• get new state store.getState()
Action
Reducer
Store
App call
root reducer
root reducer
new state
subscribe() dispatch()
getState()
REACT-REDUX (1/2)
• <Provider> (Store container)
• Call by component child
Store
Component
Provider
REACT-REDUX (2/2)
• connect([mapStateToProps], [mapDispatchProps], null, null)
• [mapStateToProps(state, [ownProps]): stateProps]
• [mapDispatchProps(dispatch, [ownProps]): dispatchProps]
State
Dispatch
Connect
Provider
SESSION CONTROL
Client-side Server-side
Basic Auth
Token Cookie Session
OAuth 2.0
Digest Auth
REFERENCE
• http://www.slideshare.net/wani420/react-js-51328819
• http://www.slideshare.net/wookieb/reactjs-46622996
• http://www.slideshare.net/AndrewHull/react-js-and-why-its-awesome
• http://www.slideshare.net/AllThingsOpen/an-introduction-to-reactjs
• https://hulufei.gitbooks.io/react-tutorial/content/usage-with-react.html
• http://facebook.github.io/react
• http://www.slideshare.net/JonasOhlsson/using-redux
• https://github.com/reactjs/redux/issues/291
• http://stackoverflow.com/questions/20963273/spa-best-practices-for-authentication-
and-session-management
• http://jaysoo.ca/2016/01/03/managing-processes-in-redux-using-sagas/

More Related Content

PPTX
React JS: A Secret Preview
PPTX
React hooks
PPTX
Reactjs
PPTX
Introduction to React JS for beginners
PPTX
What Is Virtual DOM In React JS.pptx
PPTX
Introduction à React JS
PPTX
React workshop
PPTX
React JS: A Secret Preview
React hooks
Reactjs
Introduction to React JS for beginners
What Is Virtual DOM In React JS.pptx
Introduction à React JS
React workshop

What's hot (20)

PPTX
React + Redux Introduction
PDF
React js
PPTX
Intro to React
PDF
Introduction to Redux
PDF
Introduction to React JS
PPTX
Intro to React
PPTX
Spring Boot and REST API
PPTX
Redux workshop
PPTX
Introduction to React
PDF
Redux Toolkit - Quick Intro - 2022
PDF
React state managmenet with Redux
PPTX
Introduction to React JS
PPT
PPTX
ReactJS presentation.pptx
PPTX
java 8 new features
PPTX
Introduction to React JS for beginners | Namespace IT
PPT
React js
PDF
react redux.pdf
PDF
An Introduction to Redux
PPTX
React/Redux
React + Redux Introduction
React js
Intro to React
Introduction to Redux
Introduction to React JS
Intro to React
Spring Boot and REST API
Redux workshop
Introduction to React
Redux Toolkit - Quick Intro - 2022
React state managmenet with Redux
Introduction to React JS
ReactJS presentation.pptx
java 8 new features
Introduction to React JS for beginners | Namespace IT
React js
react redux.pdf
An Introduction to Redux
React/Redux
Ad

Similar to React&redux (20)

PDF
The Road To Redux
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PDF
Let's discover React and Redux with TypeScript
PPTX
Introduction to react and redux
PDF
Getting started with React and Redux
PDF
React state management with Redux and MobX
PDF
State Models for React with Redux
PDF
Making react part of something greater
PDF
A React Journey
PPTX
Getting started with react &amp; redux
PDF
Redux essentials
PPTX
[Final] ReactJS presentation
PPTX
Academy PRO: React JS. Redux & Tooling
PDF
React JS and why it's awesome
PDF
Understanding redux
PPTX
ReactJS (1)
PPTX
Getting started with Redux js
PDF
Workshop 19: ReactJS Introduction
PPTX
React + Flux = Joy
PPTX
2.React tttttttttttttttttttttttttttttttt
The Road To Redux
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Let's discover React and Redux with TypeScript
Introduction to react and redux
Getting started with React and Redux
React state management with Redux and MobX
State Models for React with Redux
Making react part of something greater
A React Journey
Getting started with react &amp; redux
Redux essentials
[Final] ReactJS presentation
Academy PRO: React JS. Redux & Tooling
React JS and why it's awesome
Understanding redux
ReactJS (1)
Getting started with Redux js
Workshop 19: ReactJS Introduction
React + Flux = Joy
2.React tttttttttttttttttttttttttttttttt
Ad

Recently uploaded (20)

PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PDF
How to Set Realistic Project Milestones and Deadlines
PDF
Software Development Company - swapdigit | Best Mobile App Development In India
PDF
Science is Not Enough SPLC2009 Richard P. Gabriel
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PPTX
Greedy best-first search algorithm always selects the path which appears best...
PPT
introduction of sql, sql commands(DD,DML,DCL))
PDF
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
PDF
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
PDF
SBOM Document Quality Guide - OpenChain SBOM Study Group
PPTX
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
PDF
Enscape 3D Crack + With 2025 Activation Key free
PDF
OpenEXR Virtual Town Hall - August 2025
PPTX
Advanced Heap Dump Analysis Techniques Webinar Deck
PDF
Canva Desktop App With Crack Free Download 2025?
PDF
IDM Crack Activation Key 2025 Free Download
PPTX
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PDF
C language slides for c programming book by ANSI
Comprehensive Guide to Digital Image Processing Concepts and Applications
How to Set Realistic Project Milestones and Deadlines
Software Development Company - swapdigit | Best Mobile App Development In India
Science is Not Enough SPLC2009 Richard P. Gabriel
ESDS_SAP Application Cloud Offerings.pptx
Greedy best-first search algorithm always selects the path which appears best...
introduction of sql, sql commands(DD,DML,DCL))
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
SBOM Document Quality Guide - OpenChain SBOM Study Group
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Enscape 3D Crack + With 2025 Activation Key free
OpenEXR Virtual Town Hall - August 2025
Advanced Heap Dump Analysis Techniques Webinar Deck
Canva Desktop App With Crack Free Download 2025?
IDM Crack Activation Key 2025 Free Download
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
C language slides for c programming book by ANSI

React&redux