Hi, is there any built-in integration for browser routes in the new official compose multiplatform navigation library?
i
Ivan Matkov
06/07/2024, 1:37 PM
Not yet, but it's in my TODO list
✅ 9
m
MerlinTHS
06/07/2024, 2:11 PM
Is there any workaround to make it work for now?
i
Ivan Matkov
06/07/2024, 2:31 PM
workaround? It's simply not implemented - workaround is to do it on app side.
As far as I know @eygraber has some experience with it
e
eygraber
06/07/2024, 3:09 PM
I have something here, but it is built on the type safe APIs which aren't released yet. There are actuals for CMP that currently just crash when you run them, so you'd have to build the type save navigation artifacts, as well as another underlying library, and use some combination of maven local and included builds to get it to work.
The file I linked above is the entry point for most things. If you want to see how it works check out
rememberHistory()
,
SyncHistoryAndBackstackEffect
, and this line which is what consumers would use to actually update the url.