What's the equivalent of this:
<article
id="electric-cars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
...
</article>
in react kotlin dsl non-legacy wrapper.
... in react kotl" /> ... in react kotl" /> ... in react kotl"/>
What's the equivalent of this:
<article
id="electric-cars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
...
</article>
in react kotlin dsl non-legacy wrapper.
Copyright © 2021 Jogjafile Inc.
The default solution is to use extensions.
and the way you use it:
Explanation:
The way it works is you create an extension for
HTMLAttributes<*>and create a setter for it. Since the setter will be usingasDynamicit will include the property in the react html dom element.Disclaimer: I got this answer from kotlin slack group :)