Hey guys, does the KMP navigation from Google that...
# multiplatform
h
Hey guys, does the KMP navigation from Google that's implemented by Jetbrains supports type safe args in any of the alphas?
j
Not yet I believe, that was added in Navigation 2.8.0-alpha08 whereas Compose Multiplatform 1.6.10-rc02 for example is based on 2.7.7
thank you color 1
Am also looking forward to that being there 🙂
👀 1
e
If you want to test it out you can try using my branch (you have to deploy to maven local). The API should be the same, but some of the upstream Android changes need some fixing. It should all work though (I think I caught all of the bugs, but you never know 😅 ) https://github.com/eygraber/compose-multiplatform-core/tree/nav-types
K 1
d
Unpopular view: Having an imperatively mutated stack of destinations strikes me as disharmonious with declarative UI (like Compose, SwiftUI, React). An Apps 'current view' should always be derivable from application state alone: Making mutations to a nav stack feels like artificially placing a big global
var
in the Presentation layer - something we're taught not to do in other contexts. Why introduce that level of indirection (along with the opportunity for desynchronisation) when your view could be directly reactive to business state? Eyebrow raising to see this 'mutable' approach tacitly endorsed by JB. It made sense in View XML, only made sense for Compose as a migration prop, but shouldn't be encouraged in a pure declarative future. Fight me! 😉 (just not the face)
💯 1
e
For me, navigation isn't UI. It's the act of moving between UIs. Managing via state is interesting until your app gets a little bigger and then becomes a nightmare when there are a ton of screens, complex interactions, and leaky abstractions.
👍 1