rxmqjs / rxmq.js

JavaScript pub/sub library based on RxJS
144 stars 22 forks source link

Uncaught TypeError: dupChannel.observe(...).distinctUntilChanged is not a function #32

Closed Zaynex closed 4 years ago

Zaynex commented 4 years ago

From example demo:

import Rxmq from "rxmq";
const dupChannel = Rxmq.channel("Blink");

const dupSubscription = dupChannel.observe("WeepingAngel.#").distinctUntilChanged().subscribe(data => {
  document.getElementById("example4").innerHTML = data.value;
});

error:

Uncaught TypeError: dupChannel.observe(...).distinctUntilChanged is not a function
yamalight commented 4 years ago

@Zaynex rxmq uses RxJS v6, so you'd either need to use rxjs-compat package, or use functions as exposed by v6. See RxJS v5->v6 migration doc for more info

Zaynex commented 4 years ago

Thanks.