Thanks for the article. It is well written.
One comment: Arrow function may not work when it uses 'this'.
pipe: operator => { return operator(this) }
Changing it to function works
function
pipe: function(operator) { return operator(this) }
Another fix in the line to pass the event instead of event.clientX
const observable = { subscribe: observer => { document.addEventListener('click', event => { observer.next(event); }); },
Good catches! I forgot about the scope differences between => and function
=>
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article. It is well written.
One comment: Arrow function may not work when it uses 'this'.
Changing it to
function
worksAnother fix in the line to pass the event instead of event.clientX
Good catches! I forgot about the scope differences between
=>
andfunction