fix for Use of undeclared Var re-frame.core/subscribe
This commit is contained in:
parent
c7893ebd17
commit
11f410f3af
|
@ -48,18 +48,21 @@
|
|||
2 [(first rest-body') {} (second rest-body')]
|
||||
3 rest-body')
|
||||
[subs-bindings vars-bindings] (prepare-subs subs)]
|
||||
`(defn ~n ~params
|
||||
(let [~@subs-bindings]
|
||||
(reagent.core/create-class
|
||||
(merge ~(->> component-map
|
||||
(map (fn [[k f]]
|
||||
(let [args (gensym "args")]
|
||||
[k `(fn [& ~args]
|
||||
(let [~@vars-bindings]
|
||||
(apply ~f ~args)))])))
|
||||
(into {}))
|
||||
{:display-name (name '~n)
|
||||
:reagent-render
|
||||
(fn ~params
|
||||
(let [~@vars-bindings]
|
||||
~body))}))))))
|
||||
`(do
|
||||
(when-not (find-ns 're-frame.core)
|
||||
(require 're-frame.core))
|
||||
(defn ~n ~params
|
||||
(let [~@subs-bindings]
|
||||
(reagent.core/create-class
|
||||
(merge ~(->> component-map
|
||||
(map (fn [[k f]]
|
||||
(let [args (gensym "args")]
|
||||
[k `(fn [& ~args]
|
||||
(let [~@vars-bindings]
|
||||
(apply ~f ~args)))])))
|
||||
(into {}))
|
||||
{:display-name (name '~n)
|
||||
:reagent-render
|
||||
(fn ~params
|
||||
(let [~@vars-bindings]
|
||||
~body))})))))))
|
||||
|
|
Loading…
Reference in New Issue