This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-06
Channels
- # announcements (12)
- # asami (3)
- # babashka (59)
- # beginners (20)
- # biff (1)
- # calva (87)
- # cherry (8)
- # clj-kondo (41)
- # clj-together (4)
- # cljdoc (5)
- # cljfx (4)
- # cljs-dev (2)
- # cljsrn (6)
- # clojure (63)
- # clojure-europe (22)
- # clojure-nl (1)
- # clojure-norway (35)
- # clojure-uk (4)
- # clojurescript (5)
- # conjure (2)
- # datalevin (4)
- # datascript (8)
- # datomic (16)
- # events (1)
- # figwheel-main (1)
- # fulcro (9)
- # hyperfiddle (4)
- # introduce-yourself (1)
- # jobs (3)
- # kaocha (10)
- # lambdaisland (2)
- # lumo (7)
- # nbb (1)
- # off-topic (29)
- # pathom (15)
- # re-frame (80)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (13)
- # spacemacs (9)
- # sql (25)
- # squint (32)
- # tools-deps (6)
- # uncomplicate (6)
- # xtdb (15)
I think I'm not really using the REPL with Fulcro to its full potential. Any guides or pointers to specific videos from the series that demonstrate this aspect?
https://github.com/holyjak/fulcro-intro-wshop/blob/main/docs/Workshop.adoc does demonstrate that to an extent, as does https://blog.jakubholy.net/2020/troubleshooting-fulcro/#_frontend_fulcro?expanded
But essentially you can do anything in the REPL, no need to be clicking around
Thanks @U0522TWDA, I'll take some time to go through those. > But essentially you can do anything in the REPL, no need to be clicking around Is this how you work? I'm guessing there's still a fair bit of clicking around when using Fulcro Inspect and Pathom Viz because they are more ergonomic options for what they do? The rest of my development is totally REPL-based, but for some reason I just can't wrap my mind around using Fulcro mostly from the REPL. I'd say almost all of my UI testing is clicking around at the moment... which is something I'd really like to change.
Right, I meant clicking in your app's UI. You only need to do it when testing your onClick etc handlers. Everything else can be done from repl. Also instead of printing component props you can get them via db->tree etc.
Hi,
I've found some suboptimal behavior of the Synchronous TX processor, particularly regarding its usage in tests. The vast majority of the time, when (comp/transact! app [(a) (b) (c)])
is called, (a) (b) (c)
is evaluated before returning. However, since tests aren't single threaded, there is some small chance that on another thread the TX queue is being run, so my test call to comp/transact!
returns immediately. This seems to happen most often with UISM that call set-timeout
, since that function ends up calling TX on a separate thread.
I've currently band-aided a solution by adding an (await-top-level! app)
fn to the Sync TX processor and adding it strategically to my tests, but I'm curious to see if there is a more elegant solution.
Just to be clear; the tests @U5P29DSUS is talking about are running entirely in Clojure not CLJS
You can mock set-timeout, record what it is supposed to run in your mock, and manually call it where you want that logic interleaved.
That's possible. I did find an alternative though. If run-transaction-queue!
is being executed on another thread, synch tx!
will await its' completion. It's a relatively small change, see https://github.com/fulcrologic/fulcro/compare/master...daitaas:fulcro:develop
Does this change make sense to push into fulcro itself? IMO it'll save tons of headache in the future when someone else stumbles across this.