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!