Hi Sean,

The code is as follows:

(def app-state (atom {:count 0 :interval 1000}))

(defn animation-view [app owner]
  (reify
    om/IWillMount
    (will-mount [_]
      (js/setInterval
        (fn [] (om/transact! app :count inc))
        (@app-state :interval)))
    om/IRender
    (render [_]
      (dom/h1 nil (:count app))
      )))

(om/root animation-view app-state
  {:target (.getElementById js/document "app")})

Thanks,
Makoto




2014-07-26 9:18 GMT+09:00 Sean Corfield <[email protected]>:

> Can you show us animation-view?
>
> On Jul 25, 2014, at 4:36 PM, Makoto H. <[email protected]> wrote:
> > I am using om and I often encounter warning of "Only React Components
> are valid for mounting. ". For example, when I evaluate the following
> expression, the warning occurs.
> >
> > (om/root animation-view app-state
> >  {:target (.getElementById js/document "app")})
> >
> > What is it and is there any way to avoid this warning.
>
>

-- 
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.

Reply via email to