What is everyone’s best practices for managing events? I have had ideas for a putting all the event names in global list, or keeping event names in each individual provider. I don’t know what would work best with a larger app, which needs to maintain lots of event messaging both publishing and subscribing.
Mine is “don’t”.
Observables do a better job of everything one would want to do with events, for two main reasons. First, events use string names, which neither IDEs or build-time tools can monitor for silly typos. Secondly,
Observables offer typed payloads, which makes for more self-documenting code and again reduces a source of stupid bugs.