hi, noob question, I was wondering what is the proper way to use innerHTML ?
This is how I am using it :
(aset element "innerHTML" (showListByOrder items header edit delete))
But it renders html code, I get something like that :
([:div.list-data {:id "list-data"}]
(for [item items]
[:div.list-item
[:div.list-item-attr.operation.select
[:input {:type "checkbox"}]]......
...........Don't use aset and aget for anything but JS arrays, as per their docstring.
If you would like to make it work via React and not direct DOM manipulation, then you can use this:
[:div {:dangerouslySetInnerHTML {:__html html}}]
If you must use DOM manipulation for some reason, then use this:
(set! element -innerHTML html)