Function

Composition

This method is the way to initiate a composition.

Composition

Common
public fun Composition(applier: Applier<*>, parent: CompositionContext): Composition

This method is the way to initiate a composition. parent CompositionContext can be provided to make the composition behave as a sub-composition of the parent. If composition does not have a parent, Recomposer instance should be provided.

It is important to call Composition.dispose when composition is no longer needed in order to release resources.

Parameters

applier The Applier instance to be used in the composition.
parent The parent CompositionContext.