1
One more State management in Angular
(NGRX vs. NGXS vs. Akita vs RXJS)
Presenter Denys Lymarenko
Software Engineer, Angular trainer
December 2019
2
3
4
App Component
Component 1
Component 2 Component 3
Component 4
Component 5 Component 6
5
App Component
Component 1
Component 2 Component 3
Component 4
Component 5 Component 6
Service
6
Actions
Current State
New State
Reducer
Store
Component
7
JavaScript framework lifecycle
8
9
10
ActionsActions
Store
Reducer
ActionAction Effects
Component Service
Selector
11
Components Actions
Store
Plugins
Backend
Select
Dispatch
Mutate
12
Backend API
Service
Store
Query Query
Query
Query
Updates Streaming Data
Component
Actions (methods) Rendering
Interacting with other queries
13
Tooling Redux Devtools Schematics
+ +
+ +
+ +
Services - -
14
Tooling Logo
7
5
10
Services 0
15
Boilerplate code Complexity
Heavy Low
Low Low
Low Low
Services Medium Medium
16
Features NGRX NGXS AKITA Services
Forms sync 3rd party lib Core Core -
Transactions - - + -
Router sync Core Core - -
Entity adapter + labs + -
Memorized
Selectors
+ + + -
17
18
19
Component
Facade
Effects
Store State Sectors Actions Reducers
20
Demo
21
Thank you!
Denys Lymarenko
Github: LimarenkoDenis
Instagram: instalimar
denys.lymarenko@globallogic.com

One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)

Editor's Notes

  • #2 план - стейт менеджмент - зачем, какие проблемы - коротко о разнице пакетов - без привязки - демо
  • #3 Вопрос - как хранить и управлять состоянием complicated, model can update another model, combining, aggregation Redux trend
  • #4 какие есть опции - возможно нам и не нужен state management
  • #6 Общении данных между компонентов - через сервисы Пользуясь rxjs behavior subject Проблема когда приложение становится сложным - - данные с нескольких источников/агрегация -контроль и отладка - сложность
  • #7 Redux - Предсказуемый контейнер Один источник правды Прозрачность/отладка Поддерживаемость Тестирование
  • #12 легче схема болирплейт Cqrs
  • #13 any JS app(react, vanilaJs) OOP Simplicity education multiple Flux Store - immut Redux
  • #21 As many domain as we can show Prediction: pi