(defn
native-element
[parsed argv first]
(let
[comp ($ parsed :name) synthetic-input ($ parsed :syntheticInput)]
(let
[props
(nth argv first nil)
hasprops
(or (nil? props) (map? props))
jsprops
(convert-props (if hasprops props) parsed)
first-child
(+ first (if hasprops 1 0))]
(if
(or synthetic-input (input-component? comp))
(->
(if
synthetic-input
[(reagent-synthetic-input)
($ parsed :syntheticOnUpdate)
($ parsed :syntheticOnChange)
argv
comp
jsprops
first-child]
[(reagent-input) argv comp jsprops first-child])
(with-meta (meta argv))
as-element)
(let
[key
(-> (meta argv) get-key)
p
(if (nil? key) jsprops (oset jsprops "key" key))]
(make-element argv comp p first-child))))))