Fork me on GitHub

Just a quick thank you to @tony.kay and everybody that contributed to Fulcro. I have been working through the Fulcro and Fulcro-RAD documents, and playing with Fulcro-RAD together with Datomic. My mind is blown! It is a truly remarkable piece of design and engineering. Thank you!!!

💯 19
❤️ 15
Adam Helins10:02:52

Has someone written a Clj-Kondo hook for defmutation by any chance?


@adam678 I'm glossing over the syntax and it seems similar to defn? So you can use {:lint-as {.../defmutation clojure.core/defn}} perhaps. Feel free to contribute config here: This config can also live in fulcro itself if the author is willing to receive a PR, so you will get it (almost) automatically when linting the classpath.

Adam Helins10:02:15

@borkdude Almost but I believe a hook is needed:

(defmutation foo [_]
  (action [env] ...))
It accepts forms such as action which should be rewritten as fn in the hook (I guess that should do the trick). I can do it but wanted to be sure it wasn't done before. All I found is this mention: @tvaughan


Yeah, it's been mentioned a couple of times, but so far I have seen no real PR coming in ;)

👍 4
😁 4

I haven’t done any work on this

Adam Helins11:02:47

Wow, this is a big deal actually! If you did it, then congrats to you

🙏 4

For those on Mac I can also recommend to access API documentation with a global shortcut (for ~any library on Clojars)

❤️ 4

Something change in cljdoc to support the cljs ecosystem better?

Jakub Holý (HolyJak)19:02:36

I've implemented a fix for Cljdoc to be able to deal with unknown tag literals such as #js

👍 3

Nice. Good work man!

❤️ 3

Hey, we're trying to use wrap-form-element with the react-select dropdown (, but we have an issue with it losing focus when we have selected a new value. This behavior does not appear if we use the straight createElement fn instead, then it keeps the focus after having selected a value. (But if we use createElement instead, we get another issue where we're not being able to directly set a new value on the select. We've tried using :value, :defaultValue, :inputValue, :selectOption, but nothing actually switches the selected option after it's been mounted even if the props change. So we're a bit stuck 😂)


Try a non-wrapped (create-element) and a sync transact!!

Adam Helins16:02:37

This Clj-Kondo hook for defmutation seems to work I'll use it a bit in a real project before PR'ing it to @borkdude. @tony.kay In the longer term, would you consider a PR adding support for Clj-Kondo?

😻 4

Certainly not opposed…I think someone else was asking that as well..have not seen anything


If you need help with this, just ping me either here or in #clj-kondo


This is working for me @adam678 Thanks!


Oops. Spoke too soon. I see that some functions within defmutation are reported as unused. For example, I refer transact! and use it in ok-action. clj-kondo reports transact! as unused


I added {:analyze-call {com.fulcrologic.fulcro.mutations/defmutation fulcro.hooks/defmutation}} under :hooks in config.edn, fyi


@adam678 I suggest you PR the config to the clj-kondo/config and let's iterate on that for a while. When we are mostly happy, we can migrate this to fulcro proper.


It doesn't have to be perfect the 1st time in the clj-kondo/config repo


and then we don't have to bother Tony too much with this :)

👍 3
Adam Helins08:02:18

@tvaughan Indeed I noticed some false positives regarding unused vars. I wrote a second version yesterday and they are gone. Have you been using that latest version?


Just tried the new version. This seems to do the trick. Nice work @adam678!


FYI, adding "support" means adding a directory resources/clj-kondo.exports which contains the relevant config + optional hook code for clj-kondo. As an example: Clj-kondo will find this automatically on the classpath when you lint the library in question and then will suggest to the user to include it.


Hi everyone - I just published a beginner-level EQL tutorial to the fulcro-community guides. Corrections and feedback welcome!

🎉 17

@tony.kay I asked this question and couldn’t get an answer. How do you kill and paste like you do here?