From 17eafb85636d2a24f90bb5ece628bbeab30c621f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 28 Dec 2015 20:06:26 +0200 Subject: [PATCH] Use debounce for persistence. --- frontend/uxbox/core.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/uxbox/core.cljs b/frontend/uxbox/core.cljs index 6da165345..7e19ab56f 100644 --- a/frontend/uxbox/core.cljs +++ b/frontend/uxbox/core.cljs @@ -17,7 +17,7 @@ :projects-by-id]) stream (->> (l/focus-atom lens st/state) (rx/from-atom) - (rx/sample 1000) + (rx/debounce 1000) (rx/tap #(println "[save]")))] (rx/on-value stream #(dl/persist-state %))))