observeA2uiComponentState

Functions summary

A2uiComponentState

Resolves the current A2uiComponentState of the root component for an A2UI surface and subscribes for future updates.

A2uiComponentState

Resolves the current A2uiComponentState of a component by its A2uiComponentReference and subscribes for future updates.

Functions

observeA2uiComponentState

@Composable
fun observeA2uiComponentState(surface: A2uiSurfaceModel): A2uiComponentState

Resolves the current A2uiComponentState of the root component for an A2UI surface and subscribes for future updates.

Parameters
surface: A2uiSurfaceModel

The A2uiSurfaceModel containing the data, components, and catalog for this UI.

Returns
A2uiComponentState

The reactive state of the root component.

A2uiComponentScope.observeA2uiComponentState

@Composable
fun A2uiComponentScope.observeA2uiComponentState(
    reference: A2uiComponentReference
): A2uiComponentState

Resolves the current A2uiComponentState of a component by its A2uiComponentReference and subscribes for future updates.

Parameters
reference: A2uiComponentReference

The unique A2uiComponentReference of the component to resolve.

Returns
A2uiComponentState

The A2uiComponentState of the requested component.