DEV Community 👩‍💻👨‍💻

Discussion on: Intro to RxJS Concepts with Vanilla JavaScript

kishmu profile image

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

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 => {;
creeland profile image
Cree Author

Good catches! I forgot about the scope differences between => and function