Components with context

You will find here the ContextComponent description and more details on how it works.

ContextComponent is an interface that it is necessary to be implemented in components that use Context, because it contains the context attribute.

Beagle’s components with context:

  1. Container
  2. SimpleForm
  3. PageView
  4. ScrollView

Customized components with context

See below an example with customized components with context:

@RegisterWidget
data class CustomComponent(
    val otherAttribute: String
    override val context: ContextData? = null
): WidgetView(), ContextComponent
@RegisterWidget
data class CustomComponent(
    val otherAttribute: String
    override val context: ContextData? = null
): Widget(), ContextComponent
public struct CustomComponent: Component, HasContext {
    public var context: Context?
    public var otherAttribute: String
}