Composable Function

ReusableContent

A utility function to mark a composition as supporting recycling.

ReusableContent

Source set: Common
@Composable
public inline fun ReusableContent(key: Any?, content: @Composable () -> 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 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 the composable children that are recyclable.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: