(defn
adapt-react-class
([c {:keys [synthetic-input]}]
(let
[on-update
(:on-update synthetic-input)
on-change
(:on-change synthetic-input)]
(when
synthetic-input
(assert (fn? on-update))
(assert (fn? on-change)))
(let
[wrapped
(doto (->NativeWrapper) ($! :name c) ($! :id nil) ($! :class nil))
wrapped
(if
synthetic-input
(doto wrapped ($! :syntheticInput true))
wrapped)
wrapped
(if
synthetic-input
(doto wrapped ($! :syntheticOnChange on-change))
wrapped)
wrapped
(if
synthetic-input
(doto wrapped ($! :syntheticOnUpdate on-update))
wrapped)]
wrapped)))
([c] (adapt-react-class c {})))