Android 12 Developer Preview is here! Try it out, and give us your feedback!

State

enum class State
kotlin.Any
   ↳ kotlin.Enum<androidx.compose.runtime.Recomposer.State>
   ↳ androidx.compose.runtime.Recomposer.State

Valid operational states of a Recomposer.

Summary

Enum values

The Recomposer is tracking composition and snapshot invalidations but there is currently no work to do.

The Recomposer is not tracking invalidations for known composers and it will not recompose them in response to changes.

The Recomposer is Inactive but at least one effect associated with a managed composition is awaiting a frame.

The Recomposer has been notified of pending work it must perform and is either actively performing it or awaiting the appropriate opportunity to perform it.

cancel was called on the Recomposer and all cleanup work has completed.

cancel was called on the Recomposer and it is no longer available for use.

Enum values

Idle

enum val Idle : Recomposer.State

The Recomposer is tracking composition and snapshot invalidations but there is currently no work to do.

Inactive

enum val Inactive : Recomposer.State

The Recomposer is not tracking invalidations for known composers and it will not recompose them in response to changes. Call runRecomposeAndApplyChanges to await and perform work. This is the initial state of a newly constructed Recomposer.

InactivePendingWork

enum val InactivePendingWork : Recomposer.State

The Recomposer is Inactive but at least one effect associated with a managed composition is awaiting a frame. This frame will not be produced until the Recomposer is running.

PendingWork

enum val PendingWork : Recomposer.State

The Recomposer has been notified of pending work it must perform and is either actively performing it or awaiting the appropriate opportunity to perform it. This work may include invalidated composers that must be recomposed, snapshot state changes that must be presented to known composers to check for invalidated compositions, or coroutines awaiting a frame using the Recomposer's MonotonicFrameClock.

ShutDown

enum val ShutDown : Recomposer.State

cancel was called on the Recomposer and all cleanup work has completed. The Recomposer is no longer available for use.

ShuttingDown

enum val ShuttingDown : Recomposer.State

cancel was called on the Recomposer and it is no longer available for use. Cleanup work has not yet been fully completed and composition effect coroutines may still be running.