Skip to content

Commit

Permalink
simplify the example
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Jun 14, 2017
1 parent f5bea03 commit a1a556e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ dependency information:

```clojure
(ns example
(:require [om.dom :as dom]
[om.next :as om]))
(:require [goog.dom :as gdom]
[om.dom :as dom]
[om.next :as om :refer [defui]]))

(defui Widget
(defui Hello
Object
(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
Expand Down

0 comments on commit a1a556e

Please sign in to comment.