<p dir="auto">Currently there is no hook that would allow us to set attributes on the node before it's injected into a document. Which is unfortunate as there are some attributes in the wild that take effect only before element is injected into a document.</p>
<p dir="auto">To workaround this I'm forced to replacing react injected nodes with clones on <code class="notranslate">componentDidMount</code><br>
<a href="https://github.com/Gozala/firefox.html/blob/react/js/element.js#L57-L61">https://github.com/Gozala/firefox.html/blob/react/js/element.js#L57-L61</a></p>
<p dir="auto">It would be great if react could expose node that will be inserted during <code class="notranslate">componentWillMount</code> or added another hook where node will be provided.</p>
<p dir="auto">Is there reason why React restricts you to just a subset of DOM elements and attributes ? Unfortunately it makes it really hard to use it with new HTML or non standard features unless support for that is added.</p>
<p dir="auto">I noticed I could create custom elements via <code class="notranslate">React.createFactory("custom")</code></p>
<p dir="auto"><a href="https://github.com/facebook/react/blob/master/src/browser/ReactDOM.js#L30">https://github.com/facebook/react/blob/master/src/browser/ReactDOM.js#L30</a><br>
<a href="https://github.com/facebook/react/blob/master/src/classic/element/ReactElement.js#L201-L209">https://github.com/facebook/react/blob/master/src/classic/element/ReactElement.js#L201-L209</a></p>
<p dir="auto">But it's not documented &amp; not sure if supported in long term. And even if it was supported that still does not solve problem of attributes as ones not listed in the docs seem to be ignored.</p>
<p dir="auto">I think it would be good idea to allow defining custom virtual DOM Elements with a custom list of attributes so that users could implement them even if support for new element isn't in the core yet.</p>
<p dir="auto">Finally support for namespaces would be super useful for using react even in more environments &amp; should not be too hard either. I have successfully used <a href="https://github.com/Matt-Esch/vtree">vtree</a> / <a href="https://github.com/Matt-Esch/vdom">vdom</a> to do that.</p>