fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
JAtkins 2020-10-16T02:17:36.305600Z

Can UISM instances be actors in other UISM instances? It seems that it's possible, but kinda weird since actors are idents and the only way to trigger UISM events is via the id (not ident). Maybe I'm just missing the helper fn?

tony.kay 2020-10-17T01:17:59.314400Z

Technically yes. Anything with an ident can be an actor, but of course I/O integration is around UI components, so that is not really the intention.

tony.kay 2020-10-17T01:19:30.314600Z

I’d typically say what you want to do is send other UISM IDs as event data, and store that in the local store of the UISM…really all you typically want to do is “signal” other state machines…so that is enough, and you know what “table” they live in, so having their ID means you know where to look in state if you wanted to gaze into them to look for things like “current state”

JAtkins 2020-10-17T01:20:46.315600Z

Cool, that works.

zilti 2020-10-16T15:53:44.308500Z

I have a problem with a component here. I load all data needed in :will-enter, and that component shows up with the correct data very quickly (as I expect it to). But... after it has shown up with all the data expected, for some reason there is a ton of work going on server-side still, for over 10 seconds even with a small dataset of less than 100 entries. Whatever action I try to trigger client-side gets queued and blocks until the server is done with that mysterious thing. Did anyone have that before, and can maybe give me some pointers how to figure out what's going on?

Jakub Holý 2020-10-17T20:47:20.338800Z

Take a stack trace(s) of the server to see what is it doing. Perhaps something somehow triggered by the resolver you invoked?

zilti 2020-10-22T13:56:10.389800Z

Fulcro RAD Datomic runs this one for every single account in the entire system after my actual query I posted above has been run and the results are already displayed:

_rad.database-adapters.datomic:-385 - Running [:account/first-name :account/last-name :account/roles :account/job-title :account/headline :account/photo :account/email :account/email-verified? {:account/approved [:tenant/id]} :password/hashed-value :password/iterations :password/salt :account/accepted-tos-version :account/bio {:account/languages [:language/id]} {:account/vendor-type [:vendor-type/id]} :account/vc-contact :account/location {:account/vendor-specialism [:vendor-specialism/id]} {:account/vendor-skills [:vendor-skill/id]} {:account/vendor-geo-expertises [:vendor-geo-expertise/id]} {:account/vendor-industry-experiences [:vendor-industry-experience/id]} {:account/worked-with [:external-company/id]} :account/password-reset-id {:account/links [:link/id]} :account/created :time/created] on entities with  :account/id : [[:account/id #uuid "95a2dbec-ba46-4463-8e5d-5a6eddba95b2"]]

zilti 2020-10-22T13:57:38.390Z

And this query doesn't exist anywhere in my code base. This is every existing attribute where ao/identities is set to :account/id. I have no idea why it gets triggered, and why only in this one case

cjmurphy 2020-10-22T15:12:38.390500Z

I wouldn't be loading in :will-enter . I would load in one of three places - start up, user event or timer event. And none of these require :will-enter .

cjmurphy 2020-10-22T15:23:52.390700Z

If you call the df/load just from a button do you get the same problem?

zilti 2020-10-22T15:25:58.390900Z

I will try that tomorrow morning, but a button is not really an option. Might help for debugging the problem though, thanks!

cjmurphy 2020-10-22T15:28:56.391100Z

Also you don't show the resolver or the call site. I'm happy to try to replicate. Button just for debugging the problem, to see if it still happens when simple invocation.

cjmurphy 2020-10-24T16:22:19.415Z

I realise :will-enter just means 'been routed to' and that examples in the book and RAD use it for doing serious work, including loading. So I should have been a bit more nuanced in what I said before. But nothing wrong with taking routing out of the picture. How did it go?

Helins 2020-10-16T16:23:50.311900Z

When a mutation throws, the stacktrace being logged does not contain any information about what's happening in the mutation. It stops right before, more or less at com.fulcrologic.fulcro.algorithms.tx-processing/run-actions!. This is of course very hard to work with. Is this behavior normal or is something wrong on my side of things?

tony.kay 2020-10-16T17:46:20.312Z

nothing Fulcro is doing.

tony.kay 2020-10-16T17:47:48.312400Z

Use exception breakpoints in js console

👍 1
tony.kay 2020-10-16T17:47:55.312600Z

more informative anyway

2020-10-16T20:41:34.313400Z

has anyone in here written a guide on how to add an http-remote to fulcro? looks like the book is out of date

xceno 2020-10-16T21:44:40.313500Z

When you look here: https://github.com/fulcrologic/fulcro-rad-demo/blob/master/src/shared/com/example/client.cljs#L33 You can override the remote config by doing:

(defonce app (rad-app/fulcro-rad-app
               {:remotes {:some-remote (net/fulcro-http-remote {:url "/other-api"})}
                :client-will-mount (...etc)}))

xceno 2020-10-16T21:47:04.313900Z

The fulcro-rad-app just wraps the normal fulcro-app btw: https://github.com/fulcrologic/fulcro-rad/blob/develop/src/main/com/fulcrologic/rad/application.cljc#L84

2020-10-16T21:48:03.314200Z

oh awesome, thanks!