in built async pipe code example
Example 1: why async pipe should be used in angular
Async pipe automatically unsubscribes the observable thus saving some lines of code
Async pipe utilizes on push change detection strategy which is good for performance.
Example 2: javascript pipe async functions
const pipeAwait = (...fns) => param => fns.reduce(async (result, next) => next(await result), param)