🎉 Duplicate move

This commit is contained in:
alonso.torres 2020-06-02 15:49:18 +02:00
parent d6c97f9d19
commit 174b9db1d2
10 changed files with 428 additions and 320 deletions

View file

@ -227,3 +227,10 @@
[(deref state) ref]))
(defn use-stream
"Wraps the subscription to a strem into a `use-effect` call"
[stream on-subscribe]
(mf/use-effect (fn []
(let [sub (->> stream (rx/subs on-subscribe))]
#(rx/dispose! sub)))))