This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-29
Channels
- # announcements (6)
- # beginners (110)
- # calva (18)
- # clj-kondo (19)
- # cljs-dev (27)
- # clojars (10)
- # clojure (38)
- # clojure-art (2)
- # clojure-europe (13)
- # clojure-germany (1)
- # clojure-norway (26)
- # clojure-uk (2)
- # clojurescript (10)
- # conjure (9)
- # cursive (12)
- # data-science (3)
- # datomic (22)
- # emacs (8)
- # helix (9)
- # honeysql (18)
- # introduce-yourself (1)
- # jobs (1)
- # leiningen (8)
- # lsp (22)
- # missionary (9)
- # nbb (11)
- # off-topic (83)
- # pathom (5)
- # pedestal (4)
- # polylith (1)
- # portal (1)
- # re-frame (3)
- # reitit (15)
- # remote-jobs (1)
- # rum (4)
- # shadow-cljs (88)
- # specter (12)
- # testing (1)
- # vim (39)
I found that I got this error when returning the value from something like ((observe ,,,))
in a React effect hook. When wrapping the value in a (fn [] (cancel-flow))
it works as you’d expect. This seems like React does not recognize what missionary returns as a function?
it looks like it returns a Process
type https://github.com/leonoel/missionary/blob/master/src/missionary/impl/Observe.cljs#L6-L10
Maybe a helper that returns #(kill this)
could be a workaround?
(get-cancel-fn ((observe)))
Not great admittedly
you could also have a useEffect helper that checks to see if the return value is an IFn and wraps it in a function