phteven
04/28/2025, 1:51 PM@Composable
. Ideally, I would like something similar to an Application
class that I fully control. Comparing this to React, where you explicitly call the initial render function:
ReactDOM.createRoot(document.getElementById("root")).render(...);
I am also looking into the Kilua project and I prefer its approach: https://github.com/rjaros/kilua/blob/main/examples/todomvc/src/commonMain/kotlin/TodoApp.kt
In Kilua, you own the entry point, and you can set up dependencies like ApiClient
and Storage
classes outside of any @Composable
.
Routes are described as part of your app’s component tree, and nested routes are supported (e.g., for a navigation bar, main/details view).
One important use case for this is passing the router into a DI container and using it inside side effects (such as Redux-Observables) to programmatically change the user’s route (for example, redirecting to the login screen on any “forbidden” response).
Right now, this kind of navigation is only possible inside a page’s content.CLOVIS
04/28/2025, 2:42 PMModifier
.
To me, it seems that maybe you'd want to use Compose HTML directly (so you own the entrypoint etc), and use Silk on top, rather than use the entirety of Kobweb?phteven
04/28/2025, 3:58 PMCLOVIS
04/29/2025, 7:20 AMDavid Herman
04/30/2025, 6:30 PM