0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00
penpot/frontend/uxbox/state.cljs

23 lines
498 B
Text
Raw Normal View History

2015-06-18 12:35:50 -05:00
(ns uxbox.state
(:require [uxbox.rstore :as rs]
[beicon.core :as rx]))
2015-12-13 15:57:14 -05:00
(enable-console-print!)
(defonce state (atom {}))
2015-12-14 07:17:18 -05:00
(defonce stream
2015-12-13 15:57:14 -05:00
(rs/init {:user {:fullname "Cirilla"
:avatar "http://lorempixel.com/50/50/"}
2015-12-14 13:31:21 -05:00
:workspace nil
2015-12-14 07:17:18 -05:00
:projects []
:pages []
2015-12-13 06:04:34 -05:00
:projects-by-id {}
:pages-by-id {}}))
2015-06-18 12:35:50 -05:00
2015-12-14 07:17:18 -05:00
(defonce +setup-stuff+
(do
2015-12-14 13:31:21 -05:00
(rx/to-atom stream state)
(rx/on-value stream #(println "state:" %))))
2015-12-14 07:17:18 -05:00