|
|
@@ -1,13 +1,14 @@
|
|
|
(ns frontend.react-impls
|
|
|
- "Support different react implements.")
|
|
|
+ "Support different react implements."
|
|
|
+ (:require [rum.core]))
|
|
|
|
|
|
;; Remove rum *reactions* assert
|
|
|
|
|
|
(defn rum-react
|
|
|
"Works in conjunction with [[reactive]] mixin. Use this function instead of `deref` inside render, and your component will subscribe to changes happening to the derefed atom."
|
|
|
[ref]
|
|
|
- (when rum.core/*reactions*
|
|
|
- (vswap! rum.core/*reactions* conj ref))
|
|
|
+ (when (deref #'rum.core/*reactions*)
|
|
|
+ (vswap! (deref #'rum.core/*reactions*) conj ref))
|
|
|
(and ref @ref))
|
|
|
|
|
|
(def react (atom rum-react))
|