Controlling navigation from within a provider

Why I don’t use, like, or recommend Events:

  • they use strings for dispatch, meaning typos are easy to make, hard to catch, and neither IDE code assistance or compile-time tools can be of any use

  • neither event data nor handlers provide any type security, so we have all the same problems described above, plus the lack of any way of writing meaningfully self-documenting code

I think that since they address both of these concerns, Observables are an objectively superior solution for any problem one may be tempted to solve using Events.

2 Likes