0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

🐛 Use scheduler on chunked-list component.

This commit is contained in:
Andrey Antukh 2019-08-06 09:08:00 +02:00
parent c9e88cfdb7
commit d2fe689fc5

View file

@ -34,7 +34,7 @@
state (mf/use-state initial)]
(mf/use-effect {:deps true
:init #(when (pos? (:pending-num @state))
(swap! state update-state))
(schedule-on-idle (fn [] (swap! state update-state))))
:end #(when % (rx/cancel! %))})
(for [item (:current @state)]
(children item)))))