3 ms·
I too find Reactive Programming appealing and have successfully used RxJS as you mention to build a fully reactive app - every action and data change can be obs
by drunkan 3y ago
I too find Reactive Programming appealing and have successfully used RxJS as you mention to build a fully reactive app - every action and data change can be observed and reacted to - its a fantastic library and it makes TS really powerful IMO (not to say other languages don't have this, just a powerful addition to an already versatile language).
With TS and RxJS I really like to do all the plumbing and housing a little more classically with some container classes that I call services who house and expose RxJS observables with an init() and a destroy() function where a service needs to manage its own subscriptions. So classes "services" group observables and there functionality, RxJS observables are the "plumbing" of the app, piping data around via events and then all the logic is in pure functions. I find programming like this leads to a clear data/event flow and neat seperation of concerns.