This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ReduxGiuseppe Santoro
Redux is a predictable state container for JavaScript apps
What is a state?
What is a state?
What is a state?
Action: add a Task
New state
States
S1S2
S3
S5S4
A1 A2
A3A4
A5
A6
Motivation
Our code must manage more state than ever before
Three Principles
Single source of truth
Three Principles
Single source of truth
State is read-only
Three Principles
Single source of truth
State is read-only
Changes are made with pure functions
Functions that return the exact same output for given inputs