Fork me on GitHub
#fulcro
<
2020-06-23
>
zhuxun200:06:41

Is below considered anti-pattern? I manually added :account/name to :query because I wanted to ensure that it exists regardless of whether AccountProjectList queries for it or not.

(defsc MainView [this {:session/keys [valid? account] :as props}]
  {:ident (fn [] [:component/id :session])
   :query [:session/valid?
           {:session/account (conj (comp/get-query AccountProjectList) :account/name)}]
   :initial-state {}}
  (div
    (div (str "Hello, " (:account/name account) "!"))
    (ui-account-project-list account)))

souenzzo01:06:45

Placeholders should help with this

zhuxun204:06:36

@souenzzo Thanks! Could you elaborate a bit?

wilkerlucio07:06:34

@zhuxun2 didn't get why you didn't just add this to AccountProjectList directly?

zhuxun212:06:09

Because AccountProjectList does not need :account/name itself. I thought AccountProjectList should not know the existence of MainView, isn't that right?

murtaza5209:06:42

If default value of 0 is defined for a rad attribute, then the default value doesnt appear on the form. The reason being the renderer checks if the value is a bigdec, and that check fails,this is the check in the code - (cognitect.transit/bigdec? 0), I can get this to return true irrespective to what value I give to it - 0M, 0, "0", 0.0, 12.12 etc - can someone help what will be a valid value for the above expression ?

zhuxun213:06:17

http://book.fulcrologic.com/#ASTMutationJoins When the defmutation is in a separate file, using mutation joins requires using the quoted syntax doesn't it? Otherwise there's cyclic dependency...

souenzzo13:06:34

Crosspost: #fulcro #pathom #eql Hello I work with EQL API's for about 2 years now and I still have many doubts about how to model my query/data into EQL using fulcro/pathom. So I created a "style guide" I would be very happy to see the community participate in this process 🙂 https://github.com/souenzzo/eql-style-guide

solussd16:06:03

I'm running into a peculiar issue using Workspaces with Fulcro Inspect. In Fulcro Inspect I can see the workspace Root in the App dropdown, but I cannot see my Card. It's as if the card app does not exist. What is weirder is it works for a colleague - same chrome version, same fulcro inspect extension, same code version, etc. I don't think I have any more context– has anyone resolved a similar issue?

daemianmack16:06:37

^ worth pointing out too that, along with the Root , the App dropdown also shows our.ns/ourcard-toolbar — just not our.ns/ourcard.

tony.kay17:06:54

There is an Inspector button on each card. That focuses it in Inspect

tony.kay17:06:44

I’d also recommend using my fork of workspaces. The nubank one is still written in F2, which means both will be on classpath and could lead you to make mistakes in your requires

solussd17:06:15

Nothing happens when I hit the inspect button. 😕

wilkerlucio20:06:22

try re-installing the extension, I've seen many cases that it got corrupted somehow

solussd17:06:34

It works for other people, so I'm wondering what could be different for me.