This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-08
Channels
- # asami (22)
- # babashka (35)
- # beginners (4)
- # calva (76)
- # cider (7)
- # clj-on-windows (89)
- # clojure (30)
- # clojure-europe (25)
- # clojurescript (10)
- # conjure (46)
- # fulcro (13)
- # gratitude (5)
- # lambdaisland (4)
- # lsp (13)
- # malli (5)
- # membrane (6)
- # nbb (1)
- # off-topic (11)
- # re-frame (2)
- # releases (1)
- # shadow-cljs (45)
- # xtdb (4)
Hi all, I found a small 'counter' example that sets up an ::initialize-db, with a map having a key, :counter
- I see/understand the pub/sub nature of rf/dispatch, and @(rf/subscribe
- and the subscribe seems to handle the rendering of the value post-dispatch event (on-click). How do I get the initial/default value that's stored?
Aha, https://github.com/Day8/re-frame/blob/master/docs/Loading-Initial-Data.md is the info I was missing - the initial state itself needs to be done/set via a dispatch call (in a component or elsewhere) - cool