const MyComponent = () => {
return <div style="color: blue;" class="some-thing" attr:id="another-thing">
Hello world!
</div>
}
const my_green_component = <MyComponent clean={(element) => {
console.log("my_green_component is dead...")
}} />
// this will log when the component is permanently detached
Generated using TypeDoc
when explicitly declaring a function to execute right before the destruction of the element, use the
cleaninline property .also see
ExecutePropfor the on-cleanup function signature.