lhwdev
11/17/2021, 1:55 PM@Composable
is defined with the annotation. (I know this can't be adopted as it is a huge breaking change)
Now there are a lot of things using Compose runtime; Compose UI, Glance, Some terminal(I do not remember the name), and can be extended freely.
If both Compose UI and Glance had Text
, it would be a lot confusing. 🧵lhwdev
11/17/2021, 1:59 PMif (currentComposer.applier !is E) invalidApplier()
This checks type at runtime, I don't think this is a great solution.
I initially thought like:
annotation class ComposableAnnotation(val nodeType: KClass<*>)
@ComposableAnnotation(Any::class) // anything
annotation class Composable
// in compose ui
@ComposableAnnotation(ComposeUiNode::class)
annotation class UiComposable
Zach Klippenstein (he/him) [MOD]
11/17/2021, 5:11 PM