0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/frontend/uxbox/state.cljs
Andrey Antukh 90dd207e88 Improved persistence subsystem.
Now is more effisient and only performs the
persistence operations only when persistent
datata is changed (not the whole state atom)
2015-12-30 00:19:47 +02:00

22 lines
524 B
Clojure

(ns uxbox.state
(:require [beicon.core :as rx]
[uxbox.rstore :as rs]))
(defonce state (atom {}))
(defonce stream
(rs/init {:user {:fullname "Cirilla Fiona"
:avatar "http://lorempixel.com/50/50/"}
:dashboard {}
:workspace {}
:elements-by-id {}
:colors-by-id {}
:icons-by-id {}
:projects-by-id {}
:pages-by-id {}}))
(defn init
"Initialize the state materialization."
[]
(rx/to-atom stream state))