On 24 jan 2014, at 16:32, ritchie turner <blackdo...@gmail.com> wrote: > Thanks for this library, i like the simplicity. > > One issue, I'm trying to add a non standard attr during rendering but it's > being dropped, is that a bug or a feature :) ?
Thanks! Turns out its both bug and feature... Non standard attributes are not allowed by React itself, so that is a feature. :) But you *should* be able to add attributes starting with data- and aria-, but that turns out to be broken in Reagent currently. I've added an issue for that here: https://github.com/holmsand/reagent/issues/6 As a workaround, you could always set the attribute manually, for example like this: (defn img-wrap [props] [:img props]) (def prod-code-img (with-meta img-wrap {:component-did-mount (fn [this] (.setAttribute (reagent/dom-node this) "prod-code" (:prod-code (reagent/props this))))})) and then use prod-code-img like this: [prod-code-img {:prod-code "foo" :src "bar"}] /dan -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.