fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
tony.kay 2020-09-07T01:42:36.240Z

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

Jakub Holý 2020-09-07T11:47:42.240400Z

Thanks a lot! I have an early 2015 MacBook Pro with 16GB RAM (14GB used) and an SSD disk, which was a high-performance machine at that time but perhaps is too aged now. The OS complained about the disk being used but increasing the free space from 5 to 10GB did not change the performance.

Jakub Holý 2020-09-07T12:38:45.240600Z

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 "...in 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 [(com.myorg.myapp.my-domain/my-mutation {:param1 ~input})])` 4. Ignore the error / disable warning for arities Any better option? Thank you!

nivekuil 2020-09-07T15:09:56.240700Z

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

Jakub Holý 2020-09-07T16:07:38.240900Z

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

nivekuil 2020-09-07T16:08:37.241100Z

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)]}

nivekuil 2020-09-07T16:09:49.241400Z

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

nivekuil 2020-09-07T16:48:00.241900Z

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

1👍
nivekuil 2020-09-07T16:48:56.242Z

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

lgessler 2020-09-07T17:08:36.243500Z

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

lgessler 2020-09-07T17:09:25.244400Z

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

lgessler 2020-09-07T17:10:02.245200Z

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, ...)

nivekuil 2020-09-07T17:21:12.245400Z

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

2020-09-07T18:16:56.245600Z

hi, every body

2020-09-07T18:17:35.246400Z

I’m doing Getting Started in Fulcro Developers Guide

2020-09-07T18:18:24.247700Z

after init and build project, I go into <http://localhost:8000/> and get too much error

2020-09-07T18:19:35.247800Z

2020-09-07T18:27:36.248900Z

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

2020-09-07T18:28:58.249800Z

2.8.107, 2.11.1 not work

Jakub Holý 2020-09-07T18:33:54.249900Z

:grinning_face_with_star_eyes:

thheller 2020-09-07T18:43:15.250500Z

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

2020-09-07T18:53:22.251500Z

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]}}}}

thheller 2020-09-07T18:59:44.251900Z

hmm looks fine

tony.kay 2020-09-07T21:04:45.252700Z

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