Does anybody develop cross platform native apps, K...
# compose
i
Does anybody develop cross platform native apps, KMM for example? Is there compose
remember
analog in SwiftUI?
a
@state is your analog for swift ui
i
Not exactly the same Example. In compose i can put lambda into
remember
and then use it result next:
Copy code
@Composable
fun <Component> BindWithComponent(
    provideComponent: () -> Component,
    content: @Composable (Component) -> Unit
) {
    val component by remember(provideComponent) {
        mutableStateOf(provideComponent())
    }
    content(component)
}
But in ios this is impossible behaviour^ if i understand correct
w
🤔 How it works when a
lambda
is in
remember
? since its value would not change to trigger recomposition? Or Compose is “clever” to actually make a state of the return value of the
lambda
? (I see the
lambda
given to
remember
itself, but not sure when that would be triggered again)