Om generates Reactjs javascript code (without JSX)
For example:
(ns ...
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(defn time-now [h m s]
(dom/div nil
(dom/div #js {:className "hours"} h)
(dom/div #js {:className "minutes"} m)
(dom/div #js {:className "seconds"} s)))
will be compiled to
user.time_now = function time_now(h, m, s) {
return React.DOM.div(null, React.DOM.div({"className":"hours"}, h),
React.DOM.div({"className":"minutes"}, m),
React.DOM.div({"className":"seconds"}, s));
};
or using sablono https://github.com/r0man/sablono
(ns ...
(:require [sablono.core :refer-macros [html]]))
(defn time-sablono [h m s]
(html [:div
[:div.hours h]
[:div.minutes m]
[:div.seconds s]]))
On Sunday, February 23, 2014 9:55:07 PM UTC+2, Abdullah Mamun wrote:
> Hi all,
>
> After read om documentation, I really liked Cursor concept in om.
>
> Both om and React have same rendering module. Is there any way to use React
> component from om?
>
> Br,
> Mamun
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.