+ All Categories
Home > Science > Redux Club degli Sviluppatori

Redux Club degli Sviluppatori

Date post: 16-Apr-2017
Category:
Upload: giuseppe-santoro
View: 236 times
Download: 0 times
Share this document with a friend
17
Redux Giuseppe Santoro
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

They should also be free of side-effects

Pure Function

Code Example

Demo


Recommended