Fork me on GitHub
Endre Bakken Stovner20:10:37

I have the following subscription:


 (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 what

Endre Bakken Stovner20:10:43 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


It wants dev-config.edn that hasn't been checked into the repo.


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.


(`js/console.log` accepts any amount of arguments)

Endre Bakken Stovner18:11:12

Thank you for bothering to reply! It is very kind of you 🙂

Endre Bakken Stovner18:11:29

I have not had time to work on personal stuff until now, that is why no reply 🙂

Endre Bakken Stovner18:11:51

You are absolutely correct about dev-config. I wonder why it is not checked in by default.