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:
parent
b3f3d51dae
commit
e59605ec11
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,11 @@
|
|||
[e]
|
||||
(satisfies? EffectEvent e))
|
||||
|
||||
(extend-protocol UpdateEvent
|
||||
function
|
||||
(-apply-update [func state]
|
||||
(func state)))
|
||||
|
||||
(defonce bus (rx/bus))
|
||||
|
||||
(defn emit!
|
||||
|
|
Loading…
Add table
Reference in a new issue