Im recently using reagent and re-frame for my clojurescript project and i have a problem: So i have html custom tags
<question id="1"></question>
<question id="2"></question>
And i want to swap them into my reagent-generated html using cljs for function
(defn mypanel []
[:p "Hi!"])
(let [q (.getElementsByTagName js/document "question")]
(for [i (range 2)]
^{:keys i}
(reagent/render [mypanel]
(aget (.getElementsByTagName js/document "question") i))))
But it doesn't work, i tried to test it without using the for function by
(reagent/render [mypanel]
(aget (.getElementsByTagName js/document "question") 0))
and it worked just fine with only one tag.
And i don't know why the for function doesn't work, or does reagent doesn't work that way? Anybody have a suggestion?
I'm very noob at this.