This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-26
Channels
- # announcements (7)
- # aws (1)
- # babashka (15)
- # beginners (144)
- # calva (8)
- # chlorine-clover (15)
- # clara (4)
- # clojure (65)
- # clojure-europe (131)
- # clojure-france (1)
- # clojure-nl (6)
- # clojure-nlp (3)
- # clojure-spec (10)
- # clojure-uk (52)
- # clojuredesign-podcast (2)
- # clojurescript (28)
- # cryogen (1)
- # datomic (17)
- # events (2)
- # figwheel-main (2)
- # fulcro (8)
- # hugsql (2)
- # jackdaw (4)
- # jobs (1)
- # leiningen (8)
- # lumo (1)
- # malli (4)
- # off-topic (23)
- # parinfer (3)
- # pathom (3)
- # pedestal (5)
- # re-frame (9)
- # reagent (26)
- # reitit (13)
- # reveal (25)
- # shadow-cljs (45)
- # spacemacs (7)
- # sql (7)
- # tools-deps (40)
- # vrac (2)
- # xtdb (22)
I have the following subscription:
(rf/reg-sub
:highlight/result
(fn [query-v]
[(rf/subscribe [:fields/path]) (rf/subscribe [:fields/structure])])
(fn [[fields structure] query-v]
(js/console.log (str "Hi from reg-sub: " (type fields)))
(js/console.log (str "Hi from reg-sub: " (type structure)))
(str (highlight fields structure))))
When I try to print the types above I get Hi from reg-sub: function (meta,cnt...
I expected both types to be a Clojure data structure. Is it to be expected that they are functions? I suspect it is an indication I am doing something wrong. Dunno whathttps://github.com/endrebak/ouija/blob/master/src/cljs/ouija/events.cljs#L61 is where the weirdness happens if anyone is interested in taking a look 🙂
I cannot run your project:
could not find a non empty configuration file to load. looked in the classpath (as a "resource") and on a file system via "conf" system property
Ah, got it running. And now I realize what's wrong. In hindsight, I should've seen it from the code.
Keywords are functions. That's it. Don't wrap the arguments to js/console.log
in str
- you will see proper types if you're using cljs devtools.
Thank you for bothering to reply! It is very kind of you 🙂
I have not had time to work on personal stuff until now, that is why no reply 🙂
You are absolutely correct about dev-config. I wonder why it is not checked in by default.