reactjs overview

28
ReactJS Overview 09/14/2015

Upload: ping-wen-mark-hsu

Post on 14-Apr-2017

332 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: ReactJS Overview

ReactJS Overview

09/14/2015

Page 2: ReactJS Overview

Ping-Wen (Mark) Hsu Full-Stack Developer

Page 3: ReactJS Overview
Page 4: ReactJS Overview
Page 5: ReactJS Overview

Controller

View

Model

Page 6: ReactJS Overview

Initial fetch

Model

View

Page 7: ReactJS Overview

Initial fetch

Model

View

User Interaction

Page 8: ReactJS Overview

Initial fetch

Model

View

User Interaction

Model Model

View View

Page 9: ReactJS Overview

Initial fetch

Model

View

User Interaction

Model Model

View View

Page 10: ReactJS Overview

Initial fetch

Model

View

User Interaction

Model Model

View View

Page 11: ReactJS Overview

Initial fetch

Model

View

User Interaction

Model Model

View View

Page 12: ReactJS Overview

Initial fetch

Model

View

User Interaction

Model Model

View View

Real-Time

Page 13: ReactJS Overview

Single source of truth

Thinking in components

Always redraw (Virtual DOM)

Page 14: ReactJS Overview

Single source of truth

Thinking in components

Always redraw (Virtual DOM)

Page 15: ReactJS Overview

Model

View

View

Model

Model

ViewModel

ViewModel

ViewModel

View

Page 16: ReactJS Overview

Controller

Controller

scope

scope

Controllerscope

Controllerscope

Controllerscope

scopeController

Page 17: ReactJS Overview

Component

Component

Props

Props

ComponentProps

ComponentProps

ComponentProps

StateComponent

Page 18: ReactJS Overview

Single source of truth

Thinking in components

Always redraw (Virtual DOM)

Page 19: ReactJS Overview

Style

Template

Functionality

Style

Template

Functionality

Backbone.css

Backbone.html

Backbone-model.jsBackbone-view.js

Angular.css

Angular.html

Angular-service.jsAngular-ctrl.js

Page 20: ReactJS Overview

Style

Template

Functionality

Style

Template

Functionality

Backbone.css

Backbone.html

Backbone-model.jsBackbone-view.js

Angular.css

Angular.html

Angular-service.jsAngular-ctrl.js

StyleTemplate

Functionality

component.js

Page 21: ReactJS Overview

Item.js

Functionality

Template

Style

Page 22: ReactJS Overview

Single source of truth

Thinking in components

Always redraw (Virtual DOM)

Page 23: ReactJS Overview

Item.js

Update state

Always redraw with new state

Page 24: ReactJS Overview

Component

Component

Props

Props

ComponentProps

ComponentProps

ComponentProps

StateComponent

Page 25: ReactJS Overview

Component

Component

Props

Props

ComponentProps

ComponentProps

ComponentProps

StateComponent

Actions

Flux

Page 26: ReactJS Overview

So, why React?

Page 27: ReactJS Overview

So, why React?

Why not?

Page 28: ReactJS Overview

Q & A