What do you use for routing? - Specifically I supp...
# multiplatform
s
What do you use for routing? - Specifically I support Android, iOS, desktop, and web. Would be nice if the web URLs in particular changed so they could be hyperlinked (deep linked).
r
Check out Decompose, it supports all that plus forward navigation through history. It's got examples for these.
s
@Rok Oblak Hmm tried integrating it got some errors, checked his issue queue: • https://github.com/arkivanov/Decompose/issues/111https://github.com/arkivanov/Decompose/issues/695 I think I need to wait until these are resolved. Also it seemed to require some extra legwork on iOS. Is there something simpler? Would be nice if one could just define URL paths for every possible "screen" and then navigate between them using
gotoPath("URL_PATH")
(possibly passing state around, like you do in Angular; and probably refer to a global
enum
instead of typing in
"URL_PATH"
). EDIT: Actually after checking out all the other routing libraries this one is probably the best and does have a bunch of interesting routing approaches supported. Some of the other ones, like Bumble's and Slack's, have unclear support for iOS, Android, Desktop, and web targets. Also unclear support for iOS's Kotlin Multiplatform Compose. The JetBrains one doesn't seem to support deep linking or back button [on non Android]; so I'll just bite the bullet and try and get Decompose working on all targets.
r
I think these two issues are just to stabilize the library, i.e. make it non-alpha. You can check the @decompose channel here. You can checkout the repo and the examples, there is some initial boilerplate required, but you can pretty much just copy paste most of it. And yes I believe the examples already have this, i.e. you can either navigate in a typed manner programmatically, or via typing inside the url box.
c
Use Decompose too (haven't build web yet tho, iOS, android works great)