What is the difference between promise and observable?

Below are the list of differences between promise and observable,

ObservablePromise
Declarative: Computation does not start until subscription so that they can be run whenever you need the resultExecute immediately on creation
Provide multiple values over timeProvide only one
Subscribe method is used for error handling which makes centralized and predictable error handlingPush errors to the child promises
Provides chaining and subscription to handle complex applicationsUses only .then() clause

Author of content
Edit this page

Made by Michael Sakhniuk

Twitter