This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-01
Channels
- # adventofcode (170)
- # announcements (3)
- # babashka (1)
- # beginners (25)
- # cherry (1)
- # cider (3)
- # clj-kondo (5)
- # cljsrn (9)
- # clojure (27)
- # clojure-art (2)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (26)
- # clojure-sweden (2)
- # clojure-uk (5)
- # code-reviews (12)
- # component (8)
- # conjure (1)
- # data-science (2)
- # hyperfiddle (6)
- # malli (5)
- # off-topic (65)
- # overtone (34)
- # polylith (3)
- # re-frame (2)
- # reagent (2)
- # releases (3)
- # rum (1)
- # shadow-cljs (2)
- # slack-help (8)
- # sql (8)
- # squint (100)
- # thejaloniki (3)
- # tools-build (16)
- # vim (7)
- # yamlscript (1)
I think I'm missing something obvious here - Using an ui4/button, something like (e/defn Thing [db] ,,, (ui4/button (e/fn [] (e/server (side-effects!) nil)) ,,,))
, the button continues firing and running side-effects!
recursively until it (eventually) causes itself to be unmounted. Is this because side-effects!
mutates the db
that's passed to Thing
, causing it to re-mount? and/or because it's in some kinda "pressed" state that the callback fn could disable?
Mutating the db creates a cycle. Search for e/offload in the channel for previous discussions
Yes! e/snapshot worked for me - I'll use that as a workaround until UI5 obsoletes it. I don't understand e/offload, on an ELI5 level, does it effectively run something asynchronously? (while letting you optimise for the type of bottleneck you expect)
Don't worry, I found a quote: "`e/offload` moves a blocking computation to a threadpool (see docstring), so as not to block the reactive computation. databases are slow and blocking (even transact) so all database operations must be offloaded" 👍