Fork me on GitHub
Wilson Velez00:07:52

hi, I’m following the videos to learn fulcro 3.0, right now I’ve just finished the video 5: how rendering works

Wilson Velez00:07:27

I downloaded the code for the tag

Wilson Velez00:07:55

and when I tested it with the fulcro version in the example it works as in the video

Wilson Velez00:07:35

but if I upgrade the fulcro version the rendering is “broken” and now it render all the “parents”


The default renderer has been changed so that could explain it. It is now the multiple-roots-renderer , which mostly behaves just like the old keyframe-render . Perhaps the older Fulcro version uses the ident-optimized-render , which only renders components with changed data, based on their ident. This has better performance but leads to rendering troubles when Fulcro cannot figure out some dependencies (and does does not re-render something you want it to). For most cases, the multiroot is good enough and simpler.

✔️ 1
Wilson Velez00:07:56

is this something expected from this new versions?


@tony.kay regarding the :pre-merge example in - I like it simplicity but it turns out that if only works if (1) either you use :ui/* for the router property or (2) you make sure to omit Fulcro's not-found from the data tree (otherwise you end up with :my/router :com.fulcrologic.fulcro.algorithms.merge/not-found in the data-tree, which overrides whatever is in the initial state). So perhaps it is better (i.e. less error-prone) to explicitly set the router state:

:pre-merge (fn [{:keys [data-tree]}]
             (assoc data-tree 
               (comp/get-initial-state SettingPanesRouter))) 
What do you think? Should I send a PR for this?


...ooh, I have to query for the :db/ident to get the keyword of an enum. 🙂


Hello, I am writing a post about possible approaches to error handling in Fulcro. Feedback would be most appreciated! @tony.kay I am encountering a Catch-22 problem here. I must add :pc/errorsto my queries (together with Pathom's p/raise-errors) yet I don't need/want to send it to the backend since Pathom would turn all into :p/not-found (and possibly later into actual error maps, if any). I assume I could remove them from the backend query via :global-eql-transfrom . Is this a correct approach? If so - why does RAD use this transform to add :pc/errors to the query ? Thank you!


Is it possible to to a reverse lookup in a defsc query? What my situation is is I have a :notification/triggered-by that points to an :account/id. And I have a :company/primary-account that also points to :account/id. Now I want to, starting from having :notification/id, reach :company/id.


If you use datomic you can use :company/_primary-account.


Hmm, I just tried that and got nothing... I guess I could just write a resolver for the reverse case


Your pathom resolver has to have a resolver for it.


It needs to be mentioned in ::pc/output and be queried.


I often replace :user/_company in the resolver with :company/user. That gives me readable backlinks in the normalized db.


I am using Fulcro RAD Datomic, no idea if it does create reverse resolvers. Apparently not, because adding :company/_primary-account returned nothing. Hm. While we're at it, do you know if there's a way to make the ::pc/output being "or" instead of "and"? As in, when I give it #{:company/id :vendor/id} to name an example, that i mean either the first or the latter, instead of both


Hmm. Ich glaube Du fragst immer nach beiden und bekommst halt nicht zurück was er nicht findet. Im Output heißt das ja nur, dass er es Dir gibt, nicht, dass er es garantiert.


Das ist ein Set, kein AND.


Also ein Datomic Pull, kein Datomic Query.


Nein, so wie ich das gesehen habe, benutzt Pathom einen Resolver nur dann, wenn es alles, was ins ::pc/input gehört, hat


Interessanter Sprachenwechsel ^^


Jep. In Input schreibst Du Ding/id und im Output Ding/name, Ding/Adresse etc.


Ding/id muss er kennen. Und dann schaut er ober dir Ding/Name und Ding/Adresse geben kann.


Wenn Du die von Hand schreibst würdest Du ja einen Datomic Pull schreiben.


Genau, aber es gibt wohl keine Möglichkeit, zu sagen, "als Input akzeptiere ich entweder a/id oder b/id"?


Das wären zwei Resolver.


Du kannst aber einen der beiden so klein schreiben, dass er zum anderen führt.


Ansonsten gibt es noch sowas wie "Alias" oder so ähnlich, wenn sich das eine aus dem anderen ableiten läßt.


Hmm okay. Ja, dann gibt's halt mehr als einen 🙂 Danke!


Oder es werden drei Resolver, das gemeinsame in einem und zwei kleine, die zum großen überleiten.


Ja, ich habe ein paar Attribute, die ich an mehrere verschiedene "Tabellen" anhängen kann, und ich dachte, ich könnte da vielleicht einen Resolver für alle schreiben ^^ Na, ist ja nicht viel Overhead.


Wenn man die Resolver möglichst klein schreibt wiederholt man sich nicht so oft.


Ist Geschmackssache.


@holyjak I’m kinda busy for the next few days. Ping me again next week.

👍 1