Closed solussd closed 7 years ago
(defui RootView static om/IQuery (query [this] [:app/count]) Object (render [this] (let [{c :app/count} (om/props this)] (dom/div nil (str "count: " c)) (dom/button #js {:onClick #(om/transact! this `[(app/inc-count)]))} "Increment")))
transact!, get-query, and other om.next functions check if components implement the IQuery protocol using cljs.core.implements?
transact!
get-query
cljs.core.implements?
With ClojureScript 1.9.229:
(implements? om/IQuery RootView) ;=> true (implements? om/IQuery (om/get-query (om/class->any reconciler RootView) ;=> true
With ClojureScript 1.9.293:
(implements? om/IQuery RootView) ;=> false (implements? om/IQuery (om/get-query (om/class->any reconciler RootView) ;=> false
Possibly a regression caused by CLJS-1658? Just speculating.
You need to be on Om 1.0.0-alpha47 to use ClojureScript 1.9.293.
It is indeed caused by CLJS-1658 because Om relies on certain internal details of the ClojureScript compiler.
ah ha! Thanks!
transact!
,get-query
, and other om.next functions check if components implement the IQuery protocol usingcljs.core.implements?
With ClojureScript 1.9.229:
With ClojureScript 1.9.293:
Possibly a regression caused by CLJS-1658? Just speculating.