1.0.3 • Published 2 years ago
angular-bloc v1.0.3
Description :
very simple State Management Library . . . support Angular 😎 .
Installation Guide :
npm i angular-bloc
Building Steps :
build Event interface .
Build State interface .
extend Bloc from the library and provide the Event interface , and the State interface .
implement the MapEventToState function in order to emit the states later after dispatching the events .
make the ViewModel ( ts Component file ) subscribe on the Bloc Service .
generate new State and allow the Html View to bind on that state -> update the screen ui .
we are done .
extras :
you can use this library in many formats according to the reference that provided below
Guide Reference :
https://stackblitz.com/edit/angular-ivy-unuttt?file=src/app/Blocs/CounterBloc/CounterBloc.ts