The title is my basic question. The below is just more context.
Recently I’ve been working with push notifications in our Ionic app using the Ionic.io push service. That API has one endpoint to create a push with which queues it up for sending. But then it has another endpoint you can poll to see the status of the push. I wanted to create the push notification based on a user action, then subscribe to the endpoint with the status to see if it goes through or errors out. Meanwhile the user may navigate on to another part of the app. So I didn’t want to use
OnDestroy this time to unsubscribe. I decided instead to do a
takeUntil to determine when to stop.
Is this a good approach? I am still pretty new to Observables so I want to make sure this won’t create an Observable in memory that’s just hanging out somewhere.