Skip to content

Instantly share code, notes, and snippets.

@Jannis
Created February 15, 2016 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jannis/e695636cb71a3c14d1c7 to your computer and use it in GitHub Desktop.
Save Jannis/e695636cb71a3c14d1c7 to your computer and use it in GitHub Desktop.
(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