Class

CompositionContext

A CompositionContext is an opaque type that is used to logically "link" two compositions together.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
public abstract class CompositionContext internal constructor()

A CompositionContext is an opaque type that is used to logically "link" two compositions together. The CompositionContext instance represents a reference to the "parent" composition in a specific position of that composition's tree, and the instance can then be given to a new "child" composition. This reference ensures that invalidations and CompositionLocals flow logically through the two compositions as if they were not separate.

The "parent" of a root composition is a Recomposer.

Functions

scheduleFrameEndCallback

public abstract fun scheduleFrameEndCallback(action: () -> Unit): CancellationHandle