Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 950 Bytes

README.md

File metadata and controls

41 lines (35 loc) · 950 Bytes

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")
    }
}