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

April 06, 2022
461