3 ms·
Nice presentation. I have used Rx in some previous projects, however for new things I now also prefer pull-style APIs with possible async/await like you have sh
by Matthias247 10y ago
Nice presentation. I have used Rx in some previous projects, however for new things I now also prefer pull-style APIs with possible async/await like you have shown. From my point of view they are easier to comprehend (more normal syntax instead of magic operators), easier testable (less callbacks in tests) and allow a better ingeration overall (e.g. you can move ownership of the object which is iterated upon between components without doing things like complete/unsubscribe and caring about whether it's a hot observable and unsubscription might loose events).
One remark about your slides: Your implementation of "throttle" might not be what one would expect from a debounce/throttle function, as it will never emit the last value if this is filtered (shortly occurs after a previous one). In most applications the last value of an eventstream is important, as it represents the most recent / final state. E.g. for the example which makes HTTP queries out of form data you would never make a query for the final text content if the last keystroke happenend in the debounce period for the previous one.