This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-21
Channels
- # aatree (5)
- # admin-announcements (3)
- # beginners (13)
- # boot (25)
- # cider (4)
- # cljs-dev (2)
- # clojure (107)
- # clojure-austria (2)
- # clojure-japan (12)
- # clojure-russia (128)
- # clojurebridge (2)
- # clojurecup (32)
- # clojurescript (68)
- # css (4)
- # cursive (3)
- # datascript (4)
- # datomic (8)
- # devcards (25)
- # hoplon (19)
- # immutant (2)
- # ldnclj (4)
- # liberator (2)
- # luminus (5)
- # off-topic (184)
- # om (78)
- # onyx (2)
- # portland-or (11)
- # re-frame (27)
- # reagent (11)
- # yada (3)
Coming back with an answer... it was as trivial as looking into Om Next's devcards sources are remarking om/mock-root
used there!
Here's the gist of it:
(defcard
(om/mock-root reconciler YourDataScriptBackedComponent))
With that said, I'm not yet sure how we'd use devcard's initial data mechanism to bootstrap the DataScript store.
(Apart from doing it manually.)
At least the following can be done, but evidently, with no standard devcards atom-based storage handling, nor history:
(defcard
(let [conn (d/create-conn {})
reconciler (om/reconciler {:state conn :parser (om/parser {:read read :mutate mutate})})]
(d/transact! conn [{:db/id -1 :person/first-name "Dan"}])
(om/mock-root reconciler FirstName)))