How to execute code every time a Composable is shown (and execute only once)
Use LaunchedEffect (link)
LaunchedEffect(Unit) {
    // Actions to perform when LaunchedEffect enters the Composition 
}

It takes one or more key parameters that are used to cancel the running effect and start a new one. Since you need to execute your code only once use something immutable as a key like Unit or true.

I am creating a Composable which is responsible for showing notifications to users. Every time the user goes to that Composable, I want to execute a query which will clear the notification count. I only want to execute that query when the Composable has appeared, not every time the Composable is recomposed due to configuration change and anything.
Essentially I am looking for an equivalent of https://developer.apple.com/documentation/swiftui/view/onappear(perform:).
Is there any method I can use in Jetpack Compose?
