Monday, 15 February 2010

clojurescript - What does this "#" mean in this Clojure context? -



clojurescript - What does this "#" mean in this Clojure context? -

i stumbled upon official om illustration under "examples/mixins", there's definition this:

(def mycomponent (let [obj (om/specify-state-methods! (clj->js om/pure-methods))] (aset obj "mixins" #js [testmixin]) (js/react.createclass obj)))

what "#js" mean? couldn't find clojure documentation on symbol "#" when it's used in way.

from om tutorial:

#js {...} , #js [...] referred reader literal. clojurescript supports info literals javascript via #js. #js {...} javascript objects:

#js {:foo "bar"} ;; equivalent #js {"foo" "bar"}

clojurescript om

No comments:

Post a Comment