Created
December 15, 2015 14:54
-
-
Save txus/4b421085c2c922dbc687 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defui UserView | |
static om/Ident | |
(ident [this {:keys [user/id]}] | |
[:user/by-id id]) | |
static om/IQuery | |
(query [this] | |
'[:user/id :user/name :user/authenticated])) | |
(defui UserProfilesView | |
static om/IQuery | |
(query [this] | |
[{:app/users (om/get-query UserView)}])) | |
(defui RootView | |
static om/IQuery | |
(query [this] | |
`[{:root | |
[~@(om/get-query UserProfilesView)]}])) | |
(def init-data | |
{:root | |
{:app/users | |
[{:user/name "guest" :user/id :guest}]}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment