This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-03
Channels
- # aws (9)
- # beginners (5)
- # calva (5)
- # cljdoc (7)
- # cljsrn (3)
- # clojure (50)
- # clojure-greece (3)
- # clojure-uk (96)
- # clojurescript (18)
- # community-development (2)
- # core-logic (3)
- # cursive (4)
- # datomic (7)
- # emacs (3)
- # figwheel-main (3)
- # fulcro (5)
- # luminus (4)
- # mount (2)
- # nrepl (11)
- # onyx (6)
- # portkey (1)
- # qlkit (3)
- # re-frame (6)
- # shadow-cljs (33)
- # sql (8)
- # test-check (18)
- # yada (3)
Hi, I am using re-frame and shadow-cljs for development. Now, whenever I change the function of subscription the code is not updated in the browser. any idea what I need to do here? Updating UI works as expected.
Also for my sub in question: `re-frame: overwriting :sub handler for: Object { ns: "de.sveri.getless.banking.subs", name: "selected-range", fqn: "de.sveri.getless.banking.subs/selected-range", hash: -791936506, "cljs$lang$protocolmask$partition0$": 2153775105, "cljs$lang$protocol_mask$partition1$": 4096 }`
I can reproduce this with these few lines if someone wants to try:
(rf/reg-event-db
::initialize-db
(fn [db _]
(-> db
(assoc :foobar "state"))))
(rf/reg-event-db
::s-changed
(fn [db _]
(-> db
(assoc :foobar (str (rand-int 10))))))
(rf/reg-sub
::foobar
(fn [db _]
(println "werwer")
(-> db :foobar)))
(defn ui []
(let [s (<sub [::foobar])]
[:h3
{:on-click #(>evt [::s-changed])}
s]))
(defn render []
(reagent/render [ui] (js/document.getElementById "banking_js")))
(defn ^:export run []
(rf/dispatch-sync [::initialize-db])
(render))
hi guys
what is the best way to upload file as re-frame dispatch event ?