0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

Add implementation of UpdateEvent for function.

Just for make easy implement pure state transformation
events just using plain functions, without reify.
This commit is contained in:
Andrey Antukh 2016-02-24 17:19:40 +02:00
parent b3f3d51dae
commit e59605ec11

View file

@ -44,6 +44,11 @@
[e]
(satisfies? EffectEvent e))
(extend-protocol UpdateEvent
function
(-apply-update [func state]
(func state)))
(defonce bus (rx/bus))
(defn emit!