RecomposeScope


Represents a recomposable scope or section of the composition hierarchy. Can be used to manually invalidate the scope to schedule it for recomposition.

Summary

Public functions

Unit

Invalidate the corresponding scope, requesting the composer recompose this scope.

Cmn

Extension functions

CompositionObserverHandle

Observer when this scope recomposes.

Cmn

Public functions

invalidate

fun invalidate(): Unit

Invalidate the corresponding scope, requesting the composer recompose this scope.

This method is thread safe.

Extension functions

@ExperimentalComposeRuntimeApi
fun RecomposeScope.observe(observer: RecomposeScopeObserver): CompositionObserverHandle

Observer when this scope recomposes.

Parameters
observer: RecomposeScopeObserver

the observer that will be informed of recompose events for this scope.

Returns
CompositionObserverHandle

a handle that allows the observer to be disposed and detached from the recompose scope.