Nikola Milovic
12/30/2021, 12:57 PMdeps.versions.toml
it doesn't seem to be reflected anywhere
2. How can I run specific projects eg, ./gradlew :sample:master-detail:browserRun
task doesn't exist.
3. Have you had the chance to think about the Browser Routing issue? Any pointers on how to recreate configuration? As the part of getting the data and manipulating the URL is simple enoughArkadii Ivanov
12/30/2021, 1:06 PMdeps.versions.toml
is the place where versions are defined. After Gradle sync it should be updated.
2. The browser sample project is :sample:master-detail:app-js
There is a task named browserRun
, but I usually use browserDevelopmentRun
. You can enable task list in the Gradle side panel as follows: File -> Settings -> Experimental and and uncheck Do not build Gradle task list ...
3. I started working on it already and will provide some updates soon. In general - it is definitely possible. The only task is to come up with a convenient API. So you can also play with it on your own, in your own project. The idea is: 1. to update the browser history when the backstack changes; 2. to hook to the URL changes and navigate
the Router; 3. to supply initial configuration and backstack when the page is first loaded.Nikola Milovic
12/30/2021, 1:11 PMArkadii Ivanov
12/30/2021, 1:14 PMNikola Milovic
12/30/2021, 1:18 PMArkadii Ivanov
01/05/2022, 11:50 PMrouting-compose
library as a reference. This library in turn mentions two kinds of routers - HashRouter
and BrowserRouter
. Which one is more important for your needs?Nikola Milovic
01/06/2022, 5:35 PMHashRouter
variant basically tells the browser that the path after the #
is client side only and doesn't require a refresh. But this is pretty much useless as we ourselves handle the history and path, and browser.history.push()
(whatever the function is called) doesn't force a refresh either. So all in all, go for the BrowserRouter
as it's far more widespread and common, not sure if HashRouter
is much of a thing nowadays.Arkadii Ivanov
01/06/2022, 5:42 PM