Application State Management

@kenji_lozano

@kenji_lozano

Kenji Lozano

Senior Software Developer, Truextend

Organizer of Angular Bolivia Community

Ng-Bolivia

Javascript Lover

Sucre, Bolivia

Cochabamba

Let's begin with...

Flux

Flux is the application architecture that Facebook uses for building client-side web applications.

Application architecture for building user interfaces

Flux Motivation

How does it works?

What about UI Actions?

What about API Requests?

Wait... Keep in mind!

Flux

Flux is not a library

It's just a pattern... a guideline...

We're ready!

Let's code!

We have to learn some basic principles

1st Principle

Single source of truth

store

all application state is stored as a single Js Object

2nd Principle

The state tree is immutable

store

You cannot write to or modify the app state directly

3rd Principle

Changes are made with pure functions

Resources

Redux - From Zero to Hero

By Kenji Lozano

Redux - From Zero to Hero

WTH is Redux? :P

  • 166