Fork me on GitHub
eccentric J00:05:43

Can you still leverage the great things that fulcro offers if your backend is written in Python or F#?


with a pathom parser running in the client you can wrap any backend API (REST, graphQL, etc) with an eql interface that works perfectly with fulcro

parrot 12
eccentric J02:05:09

Excellent! Thanks.


While using a defsc-report component, in one of the mutations I am optimistically dissoc a row from the table. This does not force the report to rerender, just the data in that row of the report disappears, while the row controls still showing up.


I am able to force a rerender using control/run!, however there is a lag between the state ap being updated and the run!, so for a sec the row without the data is visible in the report.


Only running control/run!solves it, however ideally I dont want to run it, as I dont want to load the data from the server, just want my dom to reflect my local db, which is not happening.


I wanted to use the confirm box , not able to find it in the semantic-ui-wrapper, not sure if I am looking in the right place.


In my rad form when I save the entity, it redirects back and forth between the form and report screen multiple times, and then shows the report screen. This is the error is prints on the console -

core.cljs:159 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:188] - dr/target-ready! was called but there was no router waiting for the target listed:  [] This could mean you sent one ident, and indicated ready on another.
Also these warnings are printed on the screen -
core.cljs:159 WARN [com.fulcrologic.fulcro.ui-state-machines:692] - UNEXPECTED EVENT: Did not find a way to handle event :event/set-ui-parameters in the current active state: :state/loading
core.cljs:159 WARN [com.fulcrologic.fulcro.ui-state-machines:692] - UNEXPECTED EVENT: Did not find a way to handle event :event/run in the current active state: :state/loading


@jayzawrotny off the top of my head, these are several things to keep in mind when your server is not clojure: 1. Ensure all entities have ident key if you want them to be normalized 2. Client side are async code, so be prepared to deal with that 3. No tempids; mutation returning values can be hard or even impossible. Anyway, I believe all the greatness of (client part of) fulcro and pathom is still worth it

eccentric J17:05:36

Good to know, thanks.

Chris O’Donnell18:05:33

@U0E2YV1UZ Why do you say no tempids? If you have a standard REST API where POST requests return the created entity, shouldn't the client-side mutation be able to construct a tempid map and return it? I know I implemented tempids with client-side pathom in a fulcro 2 app backed by a graphql API using a parser plugin.


@codonnell you're right. I remember it wrong, it was just possibly more roundtrips with tempid compared to pathom in the server sude


@U0E2YV1UZ why do you say no mutation return values? I don’s see how that would be any different?


the only difference i see is it will probably multiple round trips since the parser is in the client, whereas if it was on the sever it would all be done in one


The same mistake I had with tempid, thanks for pointing it out

eccentric J19:05:55

Are there any guides or examples of code splitting\lazy loading components with Fulcro? The example in the docs seems to suggest it's lazy loading content vs another component, bundle, or styles.


The book used to have a code splitting example, but I have not updated that section for F3. Basically code spliting is mostly a cljs feature you have to understand. The Fulcro part is just that you either need to use a floating root, or a dynamic query to compose that newly loaded component into the tree

eccentric J02:05:19

Thanks very much. Backing up a bit, if you were going to build a PWA in ClojureScript. Would you use lazy loading? I presumed it would be necessary to hit the performance requirements to be installable but maybe it's more about loading something with server-side rendering than strictly the JS bundle?


So, my experience is that when using cljs your minimum bundle size is somewhat large compared to the application bits (unless it gets to be a rather large app). You really need a lot of user code before code splitting brings much of a speed win, and it hurts you in complexity. I would suggest that you play with code splitting from a “measurement” perspective early before you settle on a design: see what your production build artifacts look like.

eccentric J17:05:26

That's a very good point. I think when you use something like Lighthouse to validate a PWA it's measuring the time between server response and when seemingly meaningful\interactive content is accessible.


It would not be terribly hard to expand dynamic router to understand code splitting so that routes could be auto-loaded as you go to them.


but no, I’m not aware of any OSS examples at the moment


Tony .. I am having a few issues with guardrails on UI side these days. I getting this error


core.cljs:159 ERROR com/fulcrologic/fulcro/algorithms/form_state.cljc:182 add-form-config*'s argument list
 -- Spec failed --------------------

  [... #object[Component [object Object]] ...]

should satisfy




the thing is wants as a component class I am passing in a component instance .. so wonder why its barfing


i think it wants a class and not instance .. but how to get that class from the instance

Chris O’Donnell23:05:03

@dansudol I'm not sure if you can get the class from a component instance, but I'm not sure why you need to. Can you not pass the class to wherever you're calling add-form-config*?

Chris O’Donnell23:05:33

I believe this approach is mentioned in one of the videos.


I could @codonnell and mostly I am doing that . but was trying to be slick I guess .. reverting to just regular passing the form now so good point


@dansudol (react-type instance)


or just literally pass it the symbol of the class


probably should add an alias for that so it is easier to find