This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (5)
- # babashka (5)
- # beginners (39)
- # calva (1)
- # chlorine-clover (22)
- # circleci (4)
- # clara (5)
- # clj-kondo (1)
- # cljs-dev (2)
- # cljsrn (8)
- # clojure (46)
- # clojure-canada (15)
- # clojure-norway (3)
- # clojure-uk (6)
- # clojurescript (39)
- # conjure (10)
- # core-async (9)
- # datomic (2)
- # figwheel-main (26)
- # fulcro (33)
- # ghostwheel (9)
- # jobs (6)
- # leiningen (1)
- # malli (7)
- # music (1)
- # off-topic (48)
- # re-frame (11)
- # reagent (1)
- # shadow-cljs (86)
- # spacemacs (8)
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
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.
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 -
Also these warnings are printed on the screen -
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: [:com.fulcrologic.rad.report/id :jra.ui.farm/AccountList] This could mean you sent one ident, and indicated ready on another.
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
@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
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
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.
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.
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 component-class? -------------------------
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
@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
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