Hello. Is there any way to handle a backpress but...
# multiplatform
i
Hello. Is there any way to handle a backpress button on both platforms when using Compose Navigation Library?
a
NavController.popBackStack ?
i
@Alexandru Caraus How to know that a user clicks the back button?
On Android we can use something like this:
Copy code
@Composable
actual fun OnBackPressed(click: () -> Unit) {
    BackHandler {
        click()
    }
}
But how we should handle it on IOS?
a
Ah that one, I think ios does not support that
In ReactNative ppl disable the back gesture on ios.
In KMP there some weird solutions ppl come like this one https://github.com/adrielcafe/voyager/issues/144
i
Alexandru, thank you. I will read it.