Fork me on GitHub

nothing “passes initial state”…d routers just compose in nitial state from their targets

Jakub Holý (HolyJak)12:09:45

Any experiences with making IntelliJ not complain about invalid number of arguments passed to a client and server-side mutation? The problem is that I have both fulcro/defmutaion (which takes 1 arg) and pc/defmutation (which takes 2 args). And since my UI is .cljc , Cursive tells me correctly that the arity is not correct (implied " the context of Clojure"). The only solutions I can think of: 1. Have UI only in .cljs files 2. Do something like (comp/transact! this [(my-domain/my-mutation #?(:clj nil) {:param1 input})]) 3. Pass it a symbol instead of the function call, i.e. (comp/transact! this [( {:param1 ~input})])` 4. Ignore the error / disable warning for arities Any better option? Thank you!


I just turn those off, the arities are fixed and well known so it's not a useful lint

Jakub Holý (HolyJak)16:09:38

Is it possible to turn them off just for mutations? I like them for normal functions :)


yeah, if you're using clj-kondo in the config.edn I have

:linters {:unresolved-symbol {:exclude [(com.fulcrologic.fulcro.mutations/defmutation)                                          (com.wsscode.pathom.connect/defresolver)]}


:unresolved-symbol probably isn't the one you want but that's how to exclude particular symbols

Jakub Holý (HolyJak)18:09:54



does it ever make sense to have two components with the same ident and different queries? especially if one query is a subset of the other

👍 3

doing this lets you keep the database very normalized but complicates cache logic, i.e. it's no longer as simple as just checking for the ident in the state


for sure, say you have a ProductListItem that only displays :product/name but you also have a ProductDetails component that has :product/name, :product/manufacturer, :product/price, etc. the ident is :product/id in both cases


you could still use the loading strategy you describe if you were committed to loading the entity if and only if you're going to load all the data about it that you need, though that might become expensive


i think the more common strategy is to just use user actions to trigger loads (e.g., user navigated to ProductList, user clicked on ProductListItem and triggered the appearance of ProductDetails, ...)


that's helping me get a clearer picture, thanks. I think my attempted cleverness with reitit and the union router has been impeding my understanding of granular loads


hi, every body


I’m doing Getting Started in Fulcro Developers Guide


after init and build project, I go into and get too much error


after try many version of shadow-cljs in deps.edn, version 2.10.14 work with me


2.8.107, 2.11.1 not work


@minhnhat10bk can you share your deps.edn? most likey this is caused by a dependency conflict on something.


my current deps.edn

{:paths   ["src/main" "resources"]
 :deps    {org.clojure/clojure    {:mvn/version "1.10.1"}
           com.fulcrologic/fulcro {:mvn/version "3.0.10"}}

 :aliases {:dev {:extra-paths ["src/dev"]
                 :extra-deps  {org.clojure/clojurescript   {:mvn/version "1.10.742"}
                               thheller/shadow-cljs        {:mvn/version "2.10.14"}
                               binaryage/devtools          {:mvn/version "0.9.10"}}}}}
and shadow-cljs.edn
{:deps     {:aliases [:dev]}
 :dev-http {8000 "classpath:public"}
 :builds   {:main {:target     :browser
                   :output-dir "resources/public/js/main"
                   :asset-path "/js/main"
                   :modules    {:main {:init-fn app.client/init
                                       :entries [app.client]}}
                   :devtools   {:after-load app.client/refresh
                                :preloads   [com.fulcrologic.fulcro.inspect.preload]}}}}


hmm looks fine


if you’re goign to bump dependencies, make sure you bump to the latest Fulcro, and update the deps in package.json. Also make sure your cache is disable in browser when devtools is open @minhnhat10bk