Created
February 15, 2016 16:46
-
-
Save Jannis/e695636cb71a3c14d1c7 to your computer and use it in GitHub Desktop.
This file contains 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
(do | |
(om.next/defui ViewWithProps | |
static om.next/Ident | |
(ident [this props] | |
(let [{:keys [user/name user/email]} (om/props this) | |
{:keys []} (om/get-computed this)] | |
[:user/by-name name])) | |
Object | |
(get-name [this] | |
(let [{:keys [user/name user/email]} (om/props this) | |
{:keys []} (om/get-computed this)] | |
name)) | |
(get-email [this] | |
(let [{:keys [user/name user/email]} (om/props this) | |
{:keys []} (om/get-computed this)] | |
email))) | |
(def view-with-props (om.next/factory ViewWithProps {}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment