This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-29
Channels
- # aleph (3)
- # announcements (29)
- # babashka (99)
- # beginners (30)
- # calva (46)
- # cider (9)
- # clara (1)
- # cljsrn (4)
- # clojars (10)
- # clojure (41)
- # clojure-dev (4)
- # clojure-europe (45)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-uk (5)
- # clojurescript (61)
- # community-development (11)
- # cursive (10)
- # data-science (1)
- # events (1)
- # fulcro (17)
- # graphql (1)
- # gratitude (1)
- # holy-lambda (1)
- # jobs (4)
- # jobs-discuss (5)
- # meander (22)
- # off-topic (50)
- # pedestal (3)
- # re-frame (3)
- # reagent (3)
- # reitit (82)
- # releases (2)
- # rewrite-clj (14)
- # shadow-cljs (3)
- # spacemacs (14)
- # tools-deps (7)
- # xtdb (33)
hi everybody! I'm trying to figure out hot reloading in Krell when working with re-frame. Looking at the example the main/init function is executed every time Krell reloads code so I don't know where to dispatch re-frame initial event to set initial state in a way it doesn't smash my state everytime I make a change.
Is there something like shadow-cljs :dev/after-load
in Krell?
@jpmonettas you can use defonce
it's simple enough, we use re-frame and those dbs are in separate namespaces so generally not reloaded when editing the UI
hmm not following, where should I dispatch my app initialization event? the one that will set up initial state, start setIntervals, connect to sqlite etc? If I do it from main it will happen on every file reload
normally the only thing that happens on reload on my re-frame apps is react component remounting, everything else stays the same