π€ JS Basic Optimization Techniques
#js #worker #debounce #throttle #IntersectionObserver
β Article link
#js #worker #debounce #throttle #IntersectionObserver
β Article link
π2
π1
π₯1
π Data fetching patterns in Angular
#angular #rxjs
β Article link
#angular #rxjs
The idea of the Asynchronous State Handler is to combine asynchronous operations with an explicit loading and error state. While an asynchronous operation is running, the status is loading. It ends either in an error state or with the actual result of the operation. Thinking of a generic operation result T, the Asynchronous State Handler is a function that returns T | 'loading' | 'error'. Using a union type underlines that the result is always exactly one state. Using string literal types for loading and error state is simple but descriptive. They can be replaced by other types if required.
β Article link