This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-24
Channels
- # announcements (31)
- # babashka (21)
- # babashka-sci-dev (4)
- # beginners (8)
- # cherry (4)
- # cider (32)
- # clj-kondo (15)
- # cljdoc (4)
- # cljsrn (4)
- # clojure (69)
- # clojure-dev (1)
- # clojure-europe (12)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (4)
- # clojurescript (16)
- # clr (6)
- # conjure (4)
- # fulcro (4)
- # hispano (1)
- # honeysql (1)
- # humbleui (5)
- # hyperfiddle (8)
- # lambdaisland (4)
- # lsp (8)
- # malli (24)
- # off-topic (3)
- # polylith (5)
- # reagent (10)
- # remote-jobs (3)
- # rewrite-clj (7)
- # scittle (12)
- # spacemacs (4)
- # sql (2)
- # tools-deps (29)
- # xtdb (7)
Is it possible to defer mount until some initial df/load succeeded? Eg. to load initial translations before first render
Do the transaction in https://github.com/holyjak/minimalist-fulcro-template-backendless/blob/main/src/com/example/client.cljs#L9-L15 and only do app/mount! when you are ready. Fulcro can work fully headless so that is fine.
I either use UISM or statecharts to define my app startup (including login), because it is usually a pretty complex sequence: load config stuff, resume session, possibly load user-related data, etc etc.
In terms of mount/don’t mount: What Jakub said is true, but in real production applications I want immediate user feedback, and I usually prefer to go ahead and mount, but put some kind of root flags/progress indicators in state.
Then I make the HTML start with some kind of app loading HTML that the root component mimics so that you get immediate feedback even before the js has loaded.
As the app starts I mess with the root flags to update the progress in the UI.
E.g. the simplest is just a :ui/ready?
on the root, where the Root component has
(defsc Root [this {:ui/keys [ready?}]
{...}
(if ready?
(render-app)
(render-loading)))