redux - what is this fuss about ?

21
REDUX WHAT IS THIS FUSS ABOUT ?

Upload: rajeev-bharshetty

Post on 10-Apr-2017

155 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Redux - What is this fuss about ?

REDUX

WHAT IS THIS FUSS ABOUT ?

Page 2: Redux - What is this fuss about ?

STATE IS EVIL

Page 3: Redux - What is this fuss about ?

PREDICTABLE STATE CONTAINER FOR REACT APPS

Page 4: Redux - What is this fuss about ?

THE WHOLE STATE OF YOUR APP IS STORED IN AN OBJECT TREE INSIDE A SINGLE STORE

Page 5: Redux - What is this fuss about ?
Page 6: Redux - What is this fuss about ?

REFLUX ?

Page 7: Redux - What is this fuss about ?
Page 8: Redux - What is this fuss about ?

THREE CORE PRINCIPLES

Page 9: Redux - What is this fuss about ?

SINGLE SOURCE OF TRUTH

Page 10: Redux - What is this fuss about ?

STATE IS READ-ONLY - IMMUTABLE

Page 11: Redux - What is this fuss about ?

CHANGES MADE WITH PURE FUNCTIONS - REDUCERS

Page 12: Redux - What is this fuss about ?

ACTIONS

Page 13: Redux - What is this fuss about ?

ACTION CREATORS

Page 14: Redux - What is this fuss about ?

REDUCERS (OLDSTATE + ACTION -> NEWSTATE)

Page 15: Redux - What is this fuss about ?

STORE

Page 16: Redux - What is this fuss about ?

PRESENTATIONAL AND CONTAINER COMPONENTS

Page 17: Redux - What is this fuss about ?
Page 18: Redux - What is this fuss about ?

PRESENTATIONAL COMPONENTS

Page 19: Redux - What is this fuss about ?

CONTAINER COMPONENTS

Page 20: Redux - What is this fuss about ?

DEMO - TODOAPP

Page 21: Redux - What is this fuss about ?