const MyComponent = () => {
return <div style="color: blue;" class="some-thing" attr:id="another-thing">
Hello world!
</div>
}
const my_green_component = <MyComponent init={(element) => {
element.style.color = "green"
element.id = "a-different-thing"
}} />
// this will create:
// <div style="color: green;" id="a-different-thing" class="some-thing">Hello World!</div>
Generated using TypeDoc
when explicitly declaring a function to execute right after the creation of the element, use the
initinline property.also see
ExecutePropfor the on-initialization function signature.