Skip to content

rbro112/routing-compose

 
 

Repository files navigation

RoutingCompose

Highly experimental routing feature for Compose Web

Install

This package is uploaded to GitHub Packages.

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/hfhbd/*")
        credentials {
            username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
            password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
        }
    }
}

dependencies {
    implementation("app.softwork:routing-compose:0.0.1")
}

Usage

HashRouter(initRoute = "/users") {
    route("/users") {
        int { userID ->
            Text("User with $userID") 
        } 
        noMatch {
            Text("User list")
        }
    }
    noMatch {
        Text("Hello World")
    }
}

About

Highly experimental routing feature for Compose Web

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 99.0%
  • HTML 1.0%