I am unable to reproduce it. Here's my project.clj (created by lein new mies-om makoto):
(defproject makoto "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-2268"] [org.clojure/core.async "0.1.267.0-0d7780-alpha"] [om "0.6.5"]] :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]] :source-paths ["src"] :cljsbuild { :builds [{:id "makoto" :source-paths ["src"] :compiler { :output-to "makoto.js" :output-dir "out" :optimizations :none :source-map true}}]}) and here is the source file: (ns makoto.core (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true])) (enable-console-print!) (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")}) This compiles without warnings and runs as expected. Sean On Jul 25, 2014, at 5:26 PM, Makoto Hashimoto <[email protected]> wrote: > 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
signature.asc
Description: Message signed with OpenPGP using GPGMail
