How to Upgrade from the Ionic Event API to RxJS [v5]

ionic-events-to-rxjs

In the past we could use an easy events API inside Ionic apps to inform pages or services about updates and changes happening across our application.

With the move to Ionic v5, this API is now removed. But the good news is, we can easily change any existing code to a new system using Observables!
ionic-events-api

So if you have seen the deprecation warning in your app before upgrading to v5, here’s what you can do about it.

[DEPRECATION][Events]: The Events provider is deprecated and it will be removed in the next major release.
– Use “Observables” for a similar pub/sub architecture: https://angular.io/guide/observables
– Use “Redux” for advanced state management: https://ngrx.io


The full quick win with snippets is only available to Ionic Academy members.
Join now for

  • Unlimited access to all quick wins
  • Library of 40+ step-by-step video courses
  • Support for Ionic questions via Slack & private community

Join now & Unlock

Current member? LOGIN



Leave a Reply

Your email address will not be published. Required fields are marked *