Skip to content

Harmonize route macro with Rocket.rs #1585

@gwutz

Description

@gwutz

Question

I realized that the definition of a route with yew-router is different syntax-wise with rocket. Apparently i don't know how other frameworks define these dynamic parts but i would like to propose to harmonize maybe the syntax with rocket.

// in rocket
#[get("/api/post/<id>]
fn ...

// in yew-router
struct AppRoutes {
  #[to = "/post/{id}"
  Post
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions