This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-23
Channels
- # announcements (3)
- # aws (1)
- # beginners (44)
- # biff (6)
- # calva (31)
- # cider (26)
- # clerk (12)
- # clj-kondo (9)
- # clojure (17)
- # clojure-dev (18)
- # clojure-europe (13)
- # clojure-norway (45)
- # clojure-uk (4)
- # clojurescript (34)
- # datomic (54)
- # dev-tooling (14)
- # emacs (19)
- # events (7)
- # honeysql (2)
- # hyperfiddle (51)
- # lsp (34)
- # malli (24)
- # matrix (1)
- # missionary (5)
- # off-topic (27)
- # re-frame (6)
- # reagent (18)
- # releases (2)
- # sci (6)
- # shadow-cljs (88)
- # vim (9)
Hello fellas, How can I run multiple re-frame instances in one runtime? I can elaborate the question: how can I isolate multiple sessions of re-frame events and subscriptions?
You can't since the queue and app-db are global. Two ways around it: • Add some key to each event and sub and partition app-db by that key • Use a fork of re-frame that allows such a workflow. There was at least one or maybe two of those
I approach on this like, isolating and it’s giving me the path of testing. I researched before how someone can test re-frame code-surfaces. I found something but I don’t believe they are async, so, it share some globals as you said too.
For the context: https://github.com/day8/re-frame-test/blob/27c91065310300691947320dcca19a6883a2c6c3/src/day8/re_frame/test.cljc#L49C38-L49C38
https://github.com/nextjournal/freerange is one such fork