https://kotlinlang.org logo
#compose
Title
# compose
y

Yahor

02/29/2024, 1:11 PM
Hello, we are happy to open source simple Compose Multiplatform navigation library - Tiamat 🤗 Medium - Source code
👍 3
n

Nicolas Fortin (Univ Eiffel/UMRAE)

02/29/2024, 1:38 PM
Hello, nice, does it support js ?
y

Yahor

02/29/2024, 2:11 PM
Hello, not yet due to lack support from Compose Multiplatform) Feel free to request feature 😉
s

Stylianos Gakis

02/29/2024, 4:18 PM
Some questions: • Does this retain the navigation history through process death? • Does it support predictive back gesture handling in-between destinations and/or when you are gonna be exiting the app? • After process death, if your VM has a
savedStateHandle
, does that also get retained as it should? • What about deep link support, I saw it mentioned in the docs but I didn’t find anything in the linked sample, but I might be missing something
k

katz

02/29/2024, 5:20 PM
@Stylianos Gakis Hi there. • yes, it reteint nav history by storing it in the
rememberSaveable
via own saver. !WARNING! backstack stored via savable yet DATA-store logic base on storeMode and might be lost during process death, see doc, it is explaind in there • predictive back - cant say for 100%, it uses default back handler for android, custom for jvm and nothing for iOS. We may take a look into this direction, just create featureRequest. • all savestates rememberSavable are restored, using
storeageMode = Savable
will also retain all nav args/results - see doc • deeplink itself is about to alterate backstack, we just letting you alterate it as you want, so you free to use any kind of deeplinks logic. EG: deeplinkg smth/catalog=1&item=2. You can parese is as you want and just alterate backstack smth like
Copy code
pseudocode:
   navController.alterateBackStack{
      clear()
      add(CatalogScreen, CatalogData(id=1))
    }
    navController.replace(DetailScreen, DetailData(id=2))
https://github.com/ComposeGears/Tiamat/blob/main/example/composeApp/src/androidMain/kotlin/content/examples/platform/SavedStateScreen.kt#L66 here is example of
Parcelable
data store & restore (!read instruction on how to test this beheaviour, it's at line 31 in same file)
p

Pablichjenkov

02/29/2024, 7:51 PM
Just did an overview, looks really good!
❤️ 1
2 Views