Skip to content

Instantly share code, notes, and snippets.

@mohak1712
Last active December 19, 2019 16:55
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 mohak1712/d05a367721c9f78bb383e17ca09ae94c to your computer and use it in GitHub Desktop.
Save mohak1712/d05a367721c9f78bb383e17ca09ae94c to your computer and use it in GitHub Desktop.
(defn app-root []
(let [greeting (subscribe [:get-greeting])]
(fn []
[view {:style {:flex-direction "column" :margin 40 :align-items "center"}}
[text {:style {:font-size 30 :font-weight "100" :margin-bottom 20 :text-align "center"}} @greeting]
[image {:source logo-img
:style {:width 80 :height 80 :margin-bottom 30}}]
[touchable-highlight {:style {:background-color "#13DD1C" :padding 10 :border-radius 5}
:on-press #(alert "Hello from clojure!")}
[text {:style {:color "white" :text-align "center" :font-weight "bold"}} "press me"]]])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment