mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix(compile): fix warnings
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user