▶️ Observables vs Promises
Both Promises and Observablesprovide uswithabstractions that help usdeal with the asynchronousnatureof our applications. However, thereareimportantdifferences between thetwo:
1️⃣ As seen in theexample above, Observables candefineboth the setup and teardown aspects of asynchronousbehavior.
2️⃣ Observables are cancellable.
3️⃣ Moreover, Observables can be retried using one oftheretry operators providedbythe API, suchas retryand retryWhen. On the otherhand, Promises requirethe callerto have access totheoriginal functionthatreturned the promisein order tohave a retry capability.