This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-14
Channels
- # announcements (1)
- # asami (3)
- # aws (1)
- # babashka (22)
- # beginners (39)
- # calva (21)
- # clj-kondo (10)
- # cljdoc (22)
- # cljs-dev (17)
- # clojure (93)
- # clojure-australia (3)
- # clojure-europe (39)
- # clojure-italy (3)
- # clojure-losangeles (17)
- # clojure-nl (14)
- # clojure-russia (2)
- # clojure-uk (5)
- # clojurescript (35)
- # community-development (7)
- # conjure (2)
- # cursive (13)
- # data-science (1)
- # datomic (25)
- # emacs (5)
- # events (4)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (7)
- # gratitude (2)
- # inf-clojure (6)
- # leiningen (6)
- # lsp (49)
- # malli (13)
- # membrane (30)
- # minecraft (1)
- # pathom (3)
- # pedestal (26)
- # polylith (13)
- # portal (2)
- # quil (3)
- # random (1)
- # re-frame (13)
- # reagent (43)
- # reitit (6)
- # releases (1)
- # reveal (2)
- # ring (3)
- # shadow-cljs (30)
- # specter (5)
- # sql (8)
- # tools-build (1)
- # tools-deps (13)
- # videos (1)
Hey, do you know why re-frame-10x isn’t picking up the changes (after opening page first time)? I’m using shadow-cljs…
after changing something in code the past changes also appearing
also re_frame.db.app_db.state is showing, that changes were applied
but re-frame-10x isn’t reflecting it in UI.
The re-frame-10x panel has to be open before you make a change. Same thing as with the Network tab in the DevTools - it won't show any previous requests, only the ones that will be issued when the DevTools panel is open.
If that's not what you're experiencing, please create a minimal reproducible example.
I was wonder if there is the way to tell 10x to be loaded before :dev/after-load is triggered
Can tell for sure, but can you try opening it in a separate window and see if that works for you? There's a button for that.
In the re-frame api docs on reg-sub, it talks about the signal function
(fn [query-vec dynamic-vec]
[(subscribe [:a-sub])
(subscribe [:b-sub])])
What is dynamic-vec
? I couldn’t find a definition of that in that doc? Is it the same as the third argument to subscribe
as described in the API docs?
> an optional 3rd argument, which is a vector of further input signals (atoms, reactions, etc), NOT values. This argument exists for historical reasons and is borderline deprecated these days.
It is a list of reactive values (ratoms, reactions, etc) that can be provided when you call subscribe. They will be dereferenced and passed in a list as the third argument to your subscription handler. In the input signal function I do not believe they are de-referenced for you. Something like this might illustrate. (I did not test, just wrote it out here)
(rf/reg-sub
:asdf
(fn [db [_ foo] [r1 r2]]
(and (= foo "foo")
(= r1 :ratom1)
(= r2 :ratom2))))
@(rf/subscribe [:asdf "foo"] [(r/atom :ratom1) (r/atom :ratom2)]) ;; => true
Thanks! Is it also a depreciated use case now and I can pretty much just ignore it? Or is there use cased it might be interesting to use?
I'm not sure what the official stance is, but I would treat it as deprecated since this feature isn't really documented anymore. I've personally never found a use case for it. This page has some reading you may find interesting: https://github.com/day8/re-frame/wiki/Dynamic-Subscriptions