Fork me on GitHub

should be, though, if I’m remembering (and reading this right):


fortunately i don't need it--i'm implementing :on-result, :on-ok, and :on-error as tx options for when i need to do a tiny bit of UI work (like make a ui toast) with a result and it's annoying to do it by writing (ok-result ... etc. in the mutation because it's in a different ns


for posterity though: i just checked in an ok-result and ::txp/options is available in there

Tyler Nisonoff04:07:05

Beginner question: I'm trying to experiment with the RAD demo and wanted to redirect the user to another view (say, the Dashboard container);list=PLVi9lDx-4C_T7jkihlQflyqGqU4xVtsfi&amp;index=15 , I want to do this in the cljs mutation of login (on ok-action), however I can't figure out how to avoid a circular dependency to the component in order to pass that rroute/route-to! I'm not sure if ones supposed to pull UI components into model files for mutations (seems off, but I'm still getting a feel for this all) Is there a better approach?

Tyler Nisonoff13:07:50

maybe this would be part of the UI state machine, rather than the log in mutation? :man-shrugging:


you can find components in the component registry by fully-qualified keyword


e.g. x.y/C is in there under :x.y/C


The registry is there for just that sort of circular dep problem, though be careful that you always use it in a runtime (non-static) context. e.g. (defonce x (comp/registry-key->class :x.y/C)) will likely fail because it might run before the other loads. But (defn getC [] …) will be ok (as long as you don’t, in turn, use it in a static context) 😜


yay dynamic languages

Tyler Nisonoff14:07:16

ahh thanks!! I suppose this makes refactoring UI components a bit more fragile, since if you move your component to a new namespace, you have to remember to update the corresponding symbol here, but a test can catch that, and its no less fragile than if you specified the route string directly, and modified your route layer


moving things around from ns to ns is rife with difficulties…


I don’t love having the registry, but it’s just simply necessary for cases like this, and also cases like dynamic code loading. You cannot refer to something that you don’t load until later…but you can look it up by keyword (that you knew in advance) once its loaded.

Tyler Nisonoff15:07:04

Yeah, I see how it’s probably our best poison to pick from 🙂


Okay what is it with Fulcro/Pathom calling resolvers with nil params when the resolver clearly states it needs a certain param


Why is my resolver from :account/id to :db/id called with nil instead of the :account/id value


Ask on #pathom ?