Is there a navigation-compose equivalent to `remem...
# compose
p
Is there a navigation-compose equivalent to
rememberLauncherForActivityResult { result -> ... }
? Something like:
Copy code
navController.navigateForResult(...) { result ->
  ...
}
I am exploring ways to pass a result back to the calling Navbackstackentry but I see the existing solution still depends on creating unique keys to identify the returned result. Similar to the previous ActivityResult API where one had to define a unique RequestCode. Has anyone made any open source work in regards to this?
s
The kiwi navigation library has some code around navigation results https://github.com/kiwicom/navigation-compose-typed/blob/main/core%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fkiwi%2Fnavigationcompose%2Ftyped%2FResultSharing.kt if you must do things this way.
👍 1
a
Compose destinations also has support for handling navigation with result: https://composedestinations.rafaelcosta.xyz/navigation/backresult
👍 2
p
Oh 😮 great for the pointers, I will check them both 🙏
🎉 1