mirror of
https://github.com/penpot/penpot.git
synced 2026-03-27 22:00:35 +01: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:
@@ -44,6 +44,11 @@
|
||||
[e]
|
||||
(satisfies? EffectEvent e))
|
||||
|
||||
(extend-protocol UpdateEvent
|
||||
function
|
||||
(-apply-update [func state]
|
||||
(func state)))
|
||||
|
||||
(defonce bus (rx/bus))
|
||||
|
||||
(defn emit!
|
||||
|
||||
Reference in New Issue
Block a user