Interface

RecomposerInfo

Read-only information about a Recomposer.

Source set: Common
public interface RecomposerInfo

Read-only information about a Recomposer. Used when code should only monitor the activity of a Recomposer, and not attempt to alter its state or create new compositions from it.

Properties

state

Source set: Common
public val state: Flow<Recomposer.State>

The current State of the Recomposer. See each State value for its meaning.

hasPendingWork

Source set: Common
public val hasPendingWork: Boolean

true if the Recomposer has been assigned work to do and it is currently performing that work or awaiting an opportunity to do so.

changeCount

Source set: Common
public val changeCount: Long

The running count of the number of times the Recomposer awoke and applied changes to one or more Composers. This count is unaffected if the composer awakes and recomposed but composition did not produce changes to apply.

errorState

Source set: Common
@ComposeToolingApi
public val errorState: StateFlow<RecomposerErrorInformation?>

Get flow of error states captured in composition. This flow is only available when recomposer is in hot reload mode.

Returns

a flow of error states captured during composition

Functions

observe

@ExperimentalComposeRuntimeApi
public fun observe(observer: CompositionRegistrationObserver): CompositionObserverHandle?

Register an observer to be notified when a composition is added to or removed from the given Recomposer. When this method is called, the observer will be notified of all currently registered compositions per the documentation in CompositionRegistrationObserver.onCompositionRegistered.

Last updated: