Annotation Interface ActAsArezComponent


Annotation applied to a framework-defined type annotation to indicate that the annotated type should be treated as an Arez-compatible container.

Normally a type that contains @Action or most other Arez processor annotations must be annotated with either @ArezComponent or @ArezComponentLike. If neither annotation is present then the Arez processor reports the Arez annotation usage as invalid.

Applying @ActAsArezComponent to another annotation, such as a framework-specific @View annotation, tells the Arez processor that types annotated with that framework annotation are valid locations for Arez annotations. This allows another framework to define its own component model and process those Arez annotations itself or generate an Arez-compatible subtype.

The preferred integration pattern is for the framework annotation to depend directly on this annotation, but the Arez processor also recognizes any meta-annotation named ActAsArezComponent. This fallback exists so downstream frameworks can declare a package-access compatibility annotation without taking a direct code dependency on Arez.