I'm a bit confused with Decompose deeplinking, how...
# confetti
y
I'm a bit confused with Decompose deeplinking, how you can easily implement something similar to what we had with Androidx navigation? It seems a lot of work to 1. parse deeplinks and associate with routes 2. create a synthetic backstack, that doesn't end up confusing when you swipe back and it dismisses the app
a
Indeed, you have to parse links manually. This is because Decompose is not based on URLs. On the other hand, you automatically avoid security issues like this one: https://swarm.ptsecurity.com/android-jetpack-navigation-go-even-deeper/ And yes, you have to create the back stack manually as well. I'd assume the same is required with other nav libraries. Otherwise, if I have a link like domain.com?user_id=123, how would it navigate from user (friend) details back to e.g. my profile screen, and then back to the main screen with e.g. some specific tab opened?
y
Androidx navigation creates a synthetic backstack with at least start destination plus target. But you can use the NavDeepLinkBuilder to insert the profile as well
a
Yes, meaning you still have to create the stack manually. Also take into account nested stacks and so on.
y
Yep, just a stack of urls. Not parsing to recreate that. And the 1 and 2 stack cases are automatic.
a
Yep, with Decompose you have to parse the links manually. It's very explicit what exact links lead to what exact screens. Many devs love this actually.