JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.37k stars 1.18k forks source link

is compose multiplatform for web wasmJs support routing ? #4983

Closed YuXunSTC closed 5 months ago

YuXunSTC commented 5 months ago

In android and iOS ,the application is only one program entry, However, when we use web pages, we like to visit specific pages directly through the web address, which is supported by raw html, so I wonder if compose multiplatform now supports configuring different urls for different pages

MatkovIvan commented 5 months ago

In android and iOS ,the application is only one program entry

It's not, both supports deeplinks

if compose multiplatform now supports configuring different urls for different pages

If we're speaking of Compose itself, it's clearly not a part of its scope. Compose doesn't block to implement handling a route.

If the question is about adopted to multiplatform Jetpack Navigation library - first alphas don't support deeplinks and integration with browser history yet.

YuXunSTC commented 5 months ago

I want to develop a website with compose multiplatform, which has many entries, such as xxxx/home xxxx/about xxxx/future. When a user types in a specific address in the address bar of the browser, the corresponding page can be opened directly. Is this feature currently supported

MatkovIvan commented 5 months ago

Currently the library won't do it automatically, but you can handle it in an application code by reading current url location and show content accordingly. Kotlin supports calling browser JS API, so it shouldn't be a problem

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.