RootWrapper
Annotation that should mark root wrappers.
Example of root wrapper:
@RootWrapper
fun wrapper(fc: FC<*>) {
val mainDiv = document.getElementById("wrapper")!!
createRoot(mainDiv).render(
fc.create(),
)
}
// Here is how you should use the wrapper
fun main() = wrapper(default)
Content copied to clipboard