This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-21
Channels
- # announcements (1)
- # babashka (13)
- # beginners (85)
- # calva (1)
- # chlorine-clover (16)
- # cider (30)
- # clj-kondo (2)
- # clj-on-windows (5)
- # cljdoc (3)
- # cljs-dev (12)
- # cljsrn (19)
- # clojure (88)
- # clojure-europe (39)
- # clojure-nl (7)
- # clojure-sweden (3)
- # clojure-uk (8)
- # clojurescript (35)
- # core-async (3)
- # data-science (2)
- # datomic (17)
- # defnpodcast (3)
- # deps-new (1)
- # editors (18)
- # emacs (4)
- # events (1)
- # expound (1)
- # figwheel-main (8)
- # fulcro (9)
- # graalvm (2)
- # graalvm-mobile (11)
- # helix (44)
- # jobs (7)
- # lsp (95)
- # luminus (9)
- # malli (6)
- # meander (4)
- # membrane (2)
- # missionary (13)
- # off-topic (98)
- # pathom (2)
- # polylith (4)
- # portal (3)
- # re-frame (6)
- # reagent (27)
- # reitit (3)
- # releases (3)
- # remote-jobs (6)
- # rewrite-clj (1)
- # rum (2)
- # sci (3)
- # shadow-cljs (7)
- # sql (66)
- # tools-deps (80)
- # vim (5)
- # xtdb (3)
Hey! I’m considering a bunch of options for working with “streams of document updates” in ClojureScript. RxJS/beicon, maybe plain JS, and then also missionary. Are there any reasons why you would suggest not to use missionary?
Also curious if you know of any other people using this from ClojureScript
also just practically: I have a subscribe
function that expects an on-value
callback. Could someone help me understand how to transform this into a missionary flow?
if you're familiar with RxJS, the learning curve should be smooth. to interop with callback-based apis, use observe
missionary is partly born out of my frustrations with Rx, it aims to be strictly more powerful and I'm not aware of any use case that is not covered yet
@leonoel thanks! do you have an example for using observe
somewhere? I’m not sure I get it by just reading the docstring haha
(m/observe
(fn [!]
(.addEventListener js/window "click" !)
#(.removeEventListener js/window "click" !)))
neat, that looks easy 🙂
FWIW I think something like this would be a great example in the docs 🙂
So another question 🙂 Extending on the above example: how would I consume items from the flow until a condition is matched? E.g. the event target is a specific one.
Uhh, that’s nice