The Potions tag is written in reactive programming and is based on an internal library that, in turn, is based on the RxJS library.
Thus all storage actions, analysis, interface modifications and event sending are declared in the form of subscriptions to observables.
This programming paradigm is complex at first glance but presents many advantages:
  • the "declarative" aspect requires starting from the goal and therefore limits undesirable side effects and other bugs.
  • the "observables" handled in RxJS allow precise management of asynchronous operations
  • the entirety of the code is made up of pure functions that are easily understandable, modifiable and testable.