ReusableContent

Functions summary

inline Unit
@Composable
ReusableContent(key: Any?, content: @Composable () -> Unit)

A utility function to mark a composition as supporting recycling.

Cmn

Functions

ReusableContent

@Composable
inline fun ReusableContent(key: Any?, content: @Composable () -> Unit): Unit

A utility function to mark a composition as supporting recycling. If the key changes the composition is replaced by a new composition (as would happen for key) but reusable nodes that are emitted by ReusableComposeNode are reused.

Parameters
key: Any?

the value that is used to trigger recycling. If recomposed with a different value the composer creates a new composition but tries to reuse reusable nodes.

content: @Composable () -> Unit

the composable children that are recyclable.