Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.67 KB

README_NPM.md

File metadata and controls

19 lines (13 loc) · 1.67 KB

ngSetState

About

A library that helps developing UI (e.g. Angular or React) components in a more functional style where UI logic is representing as a series of immutable state transitions.

Advantages of using the library

  1. Performance – the angular change detection will check only already evaluated properties
  2. Independence – the library does not actually depend on angular, so if you decided to move to another framework (e.g. Vue) you will be able to reuse your state logic
  3. Quality of reusable components – Angular allows having several input parameters which can be changed independently and maintaining all possible combinations is usually not very simple (ngOnInit, ngOnChange, property setters), so often developers take into consideration just common scenarios, which is not great when you develop reusable components. The library naturally simplifies handling different combinations of input parameters, since it implicitly creates a dependency graph over all state properties.