Comment headings corrected
This commit is contained in:
parent
32336a20b5
commit
6c5a9bb880
|
@ -7,14 +7,10 @@
|
||||||
[re-frame.registrar :refer [get-handler clear-handlers register-handler]]))
|
[re-frame.registrar :refer [get-handler clear-handlers register-handler]]))
|
||||||
|
|
||||||
|
|
||||||
;; -- Subscription Handler Lookup and Registration --------------------------------------------------
|
|
||||||
(def kind :sub)
|
(def kind :sub)
|
||||||
(assert (re-frame.registrar/kinds kind))
|
(assert (re-frame.registrar/kinds kind))
|
||||||
|
|
||||||
|
;; -- cache -------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
;; -- Subscription cache -----------------------------------------------------
|
|
||||||
;;
|
;;
|
||||||
;; De-duplicate subscriptions. If two or more equal subscriptions
|
;; De-duplicate subscriptions. If two or more equal subscriptions
|
||||||
;; are concurrently active, we want only one handler running.
|
;; are concurrently active, we want only one handler running.
|
||||||
|
@ -78,7 +74,7 @@
|
||||||
;(console :log "Subscription created: " v dynv)
|
;(console :log "Subscription created: " v dynv)
|
||||||
(cache-and-return v dynv (make-reaction (fn [] @@sub)))))))))
|
(cache-and-return v dynv (make-reaction (fn [] @@sub)))))))))
|
||||||
|
|
||||||
;; -- Helper code for register-pure -------------------
|
;; -- reg-sub -----------------------------------------------------------------
|
||||||
|
|
||||||
(defn- map-vals
|
(defn- map-vals
|
||||||
"Returns a new version of 'm' in which 'f' has been applied to each value.
|
"Returns a new version of 'm' in which 'f' has been applied to each value.
|
||||||
|
@ -95,7 +91,7 @@
|
||||||
(sequential? signals) (map deref signals)
|
(sequential? signals) (map deref signals)
|
||||||
(map? signals) (map-vals deref signals)
|
(map? signals) (map-vals deref signals)
|
||||||
(deref? signals) @signals
|
(deref? signals) @signals
|
||||||
:else (console :error "re-frame: the reg-sub for " query-id ", must be wrong. Return value from input-signals function is: " signals)))
|
:else (console :error "re-frame: in the reg-sub for " query-id ", the input-signals function returns: " signals)))
|
||||||
|
|
||||||
|
|
||||||
(defn reg-sub
|
(defn reg-sub
|
||||||
|
|
Loading…
Reference in New Issue