Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created February 11, 2025 18:05
Show Gist options
  • Select an option

  • Save vitoksmile/637020c57dfcf616d7d7b1782efdd683 to your computer and use it in GitHub Desktop.

Select an option

Save vitoksmile/637020c57dfcf616d7d7b1782efdd683 to your computer and use it in GitHub Desktop.
ComposeHints
@Stable
class Hint internal constructor() {
internal var content: @Composable () -> Unit by mutableStateOf({})
}
@Composable
fun rememberHint(content: @Composable () -> Unit): Hint {
return remember {
Hint().also { it.content = content }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment