https://egghead.io/courses/save-time-avoiding-common-mistakes-using-rxjs Convert RxJS Subjects to Observables The use of RxJS Subjects is common, but not without problems. In this lesson we will see how they can be usually safely replaced with plain Observables. Sometimes you may write code in RxJS that uses subjects. While subjects have a legitimate use cases, most of the times, they are actually unnecessary. In this case, for instance, we have a subject called click stream. Whenever a click event happens in this event listener, we will send that event into the subject using the .next method. There are a couple reasons why this is a bad idea. First of all is that the click stream is now exposed here for any other script in the page to send events into it, so you may get confused how does this click stream work. You need to search for all of the usage of .next throughout the whole codebase. That may get confusing. The second reason is that the event listener here is not being dis...
Meteor evangelist, IoT, Renoise, Lua, Javascript, Coffeescript