This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-11
Channels
- # announcements (6)
- # babashka (61)
- # beginners (85)
- # calva (21)
- # cider (6)
- # clara (9)
- # clj-http (1)
- # clj-kondo (35)
- # cljfx (6)
- # clojure (91)
- # clojure-australia (11)
- # clojure-europe (23)
- # clojure-italy (7)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-uk (107)
- # clojurescript (4)
- # community-development (1)
- # cursive (69)
- # emacs (12)
- # fulcro (29)
- # graalvm (25)
- # honeysql (10)
- # hugsql (3)
- # integrant (13)
- # jobs (4)
- # kaocha (3)
- # keechma (1)
- # lambdaisland (3)
- # leiningen (2)
- # meander (17)
- # mount (3)
- # observability (1)
- # off-topic (86)
- # pathom (3)
- # polylith (2)
- # practicalli (14)
- # reitit (14)
- # shadow-cljs (61)
- # startup-in-a-month (1)
- # tools-deps (9)
- # vim (54)
- # xtdb (16)
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!!!
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: https://github.com/clj-kondo/config/blob/master/resources/clj-kondo.exports/clj-kondo/fulcro/config.edn
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.
@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 https://clojurians-log.clojureverse.org/clj-kondo/2020-12-08Yeah, it's been mentioned a couple of times, but so far I have seen no real PR coming in ;)
You might not believe it but https://cljdoc.org/d/com.fulcrologic/fulcro/ Enjoy!
Great work @U0522TWDA! 👏
For those on Mac I can also recommend https://kapeli.com/dash to access API documentation with a global shortcut (for ~any library on Clojars)
I've implemented a fix for Cljdoc to be able to deal with unknown tag literals such as #js
Hey, we're trying to use wrap-form-element
with the react-select
dropdown (https://react-select.com), 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 😂)
This Clj-Kondo hook for defmutation
seems to work https://gist.github.com/helins-io/52d03847157b0dc95c6987844a74dd68
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?
Certainly not opposed…I think someone else was asking that as well..have not seen anything
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.
@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?
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:
https://github.com/wilkerlucio/pathom/blob/master/resources/clj-kondo.exports/com.wsscode/pathom/config.edn
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! https://github.com/fulcro-community/guides/blob/main/tutorials/eql-pathom-overview.org
@tony.kay I asked this question https://clojurians.slack.com/archives/C0744GXCJ/p1613082907119400 and couldn’t get an answer. How do you kill and paste like you do here? https://youtu.be/3dZK5seIaVI?t=1238