This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-29
Channels
- # announcements (2)
- # beginners (17)
- # calva (3)
- # cljdoc (3)
- # cljsrn (7)
- # clojure (99)
- # clojure-europe (6)
- # clojurescript (18)
- # clojureverse-ops (2)
- # cryogen (1)
- # cursive (11)
- # datomic (2)
- # duct (6)
- # figwheel-main (2)
- # fulcro (3)
- # graalvm (2)
- # honeysql (1)
- # introduce-yourself (5)
- # leiningen (4)
- # meander (11)
- # membrane (14)
- # practicalli (1)
- # re-frame (4)
- # reagent (5)
- # rum (1)
- # shadow-cljs (17)
- # spacemacs (13)
- # tools-deps (6)
Is there a way to update two ratoms without causing flickering? My state is several completely disjoint parts except for a couple of functions that update both
If it's two consecutive calls to swap!
or reset!
, there should be no flickering at all. JS is single-threaded and Reagent doesn't react to ratom changes immediately, unless you call reagent.core/flush
.
Ah good. I had the feeling that when I did this before, it seemed to redraw in the middle of an series of updates. So I've tried consolidating my updates into larger swap! but in some places I need to update multiple things, for which I put everything in a mega atom.