Browse files

simplify the example

  • Loading branch information...
swannodette committed Jun 14, 2017
1 parent f5bea03 commit a1a556e100f45ec47f00d1d33069a08cb0fe761b
Showing with 7 additions and 7 deletions.
  1. +7 −7
@@ -38,18 +38,18 @@ dependency information:

(ns example
(:require [om.dom :as dom]
[ :as om]))
(:require [goog.dom :as gdom]
[om.dom :as dom]
[ :as om :refer [defui]]))
(defui Widget
(defui Hello
(render [this]
(dom/h1 nil (:text (om/props this)))))
(dom/h1 nil "Hello, world!")))
(def widget (om/factory Widget))
(def hello (om/factory Hello))
(om/add-root! widget {:text "Hello world!"}
{:target (. js/document (getElementById "my-app"))})
(.render js/ReactDOM (hello) (gdom/getElement "example"))
## Tutorials

0 comments on commit a1a556e

Please sign in to comment.