0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

⬆️ Update potok to 3.0.0.

This commit is contained in:
Andrey Antukh 2020-12-21 09:47:50 +01:00 committed by Alonso Torres
parent b7353db14e
commit 4a5e27e641
2 changed files with 8 additions and 10 deletions

View file

@ -11,10 +11,10 @@
danlentz/clj-uuid {:mvn/version "0.1.9"}
frankiesardo/linked {:mvn/version "1.3.0"}
funcool/beicon {:mvn/version "2020.05.08-2"}
funcool/beicon {:mvn/version "2020.12.20-1"}
funcool/cuerdas {:mvn/version "2020.03.26-3"}
funcool/okulary {:mvn/version "2020.04.14-0"}
funcool/potok {:mvn/version "2020.08.10-2"}
funcool/potok {:mvn/version "3.0.0"}
funcool/promesa {:mvn/version "6.0.0"}
funcool/rumext {:mvn/version "2020.11.27-0"}

View file

@ -21,10 +21,9 @@
(def ^:dynamic *on-error* identity)
(defonce state (l/atom {}))
(defonce loader (l/atom false))
(defonce store (ptk/store {:resolve ptk/resolve}))
(defonce stream (ptk/input-stream store))
(defonce state (ptk/store {:resolve ptk/resolve}))
(defonce stream (ptk/input-stream state))
(defn- repr-event
[event]
@ -49,15 +48,15 @@
(defn emit!
([] nil)
([event]
(ptk/emit! store event)
(ptk/emit! state event)
nil)
([event & events]
(apply ptk/emit! store (cons event events))
(apply ptk/emit! state (cons event events))
nil))
(defn emitf
[& events]
#(apply ptk/emit! store events))
#(apply ptk/emit! state events))
(def initial-state
{:session-id (uuid/next)
@ -67,8 +66,7 @@
"Initialize the state materialization."
([] (init {}))
([props]
(emit! #(merge % initial-state props))
(rx/to-atom store state)))
(emit! #(merge % initial-state props))))
(defn ^:export dump-state []
(logjs "state" @state))