Component

abstract class Component : Cloneable, Equivalence<T> , AttributesAcceptor

Represents a unique instance of a component. To create new Component instances, use the create() method in the generated subclass which returns a builder that allows you to set values for individual props. Component instances are immutable after creation.

Inheritors

Types

Link copied to clipboard
abstract class Builder<T : Component.Builder<T>?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface RenderData
A per-Component-class data structure to keep track of some of the last mounted @Prop/@State params a component was rendered with.

Functions

Link copied to clipboard
Link copied to clipboard
For internal use, only.
Link copied to clipboard
fun equals(@Nullable obj: Any): Boolean
Link copied to clipboard
open fun <T> getDebugAttribute(attributeKey: AttributeKey<T>): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This indicates the type of the Object that will be returned by mount.
Link copied to clipboard
open fun getSimpleName(): String
Link copied to clipboard
open fun <T> getTreePropFromParent(parentTreePropContainer: TreePropContainer, key: Class<T>): T
Link copied to clipboard
fun getTypeId(): Int
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
open fun isEquivalentProps(@Nullable other: Component, shouldCompareCommonProps: Boolean): Boolean
Determine if this component has equivalent props to a given component.
Link copied to clipboard
Compares this component to a different one to check if they are the same This is used to be able to skip rendering a component again.
open fun isEquivalentTo(@Nullable other: Component, shouldCompareCommonProps: Boolean): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun measure(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size)
Measure a component with the given SizeSpec constrain.
fun measure(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size, shouldCacheResult: Boolean)
Link copied to clipboard
fun measureMightNotCacheInternalNode(c: ComponentContext, widthSpec: Int, heightSpec: Int, outputSize: Size)
Should not be used!
Link copied to clipboard
Link copied to clipboard
open fun <T> setDebugAttributeKey(attributeKey: AttributeKey<T>, value: T)
Link copied to clipboard
Link copied to clipboard
open fun willRender(c: ComponentContext, component: Component): Boolean