{"id":13807522,"url":"https://github.com/ctron/yew-nested-router","last_synced_at":"2025-04-16T01:09:22.151Z","repository":{"id":64253869,"uuid":"573509775","full_name":"ctron/yew-nested-router","owner":"ctron","description":"A router for Yew supporting nesting","archived":false,"fork":false,"pushed_at":"2024-09-19T11:33:22.000Z","size":95,"stargazers_count":8,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T03:21:58.004Z","etag":null,"topics":["frontend","router","rust","yew"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-02T16:24:40.000Z","updated_at":"2024-11-16T16:30:02.000Z","dependencies_parsed_at":"2023-01-15T06:45:19.668Z","dependency_job_id":"3d132de9-f550-4052-8c21-571cc56ec212","html_url":"https://github.com/ctron/yew-nested-router","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"9689db446dee7030325884df768d0c2e84f353d6"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fyew-nested-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fyew-nested-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fyew-nested-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fyew-nested-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/yew-nested-router/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248879510,"owners_count":21176510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend","router","rust","yew"],"created_at":"2024-08-04T01:01:26.395Z","updated_at":"2025-04-16T01:09:22.131Z","avatar_url":"https://github.com/ctron.png","language":"Rust","funding_links":[],"categories":["Crates"],"sub_categories":["Utils"],"readme":"# Yew Nested Router\n\n[![crates.io](https://img.shields.io/crates/v/yew-nested-router.svg)](https://crates.io/crates/yew-nested-router)\n[![docs.rs](https://docs.rs/yew-nested-router/badge.svg)](https://docs.rs/yew-nested-router)\n\nA router for Yew that supports nesting.\n\n## Example\n\nIn a nutshell, you define a main router entry point (`\u003cRouter\u003cT\u003e\u003e`) where you can switch the rendering (`\u003cSwitch\u003cT\u003e\u003e`).\nYou can then translate down to the next layer (`Scope\u003cP, C\u003e`), so that you can switcher rendering again (`Switch\u003cC\u003e`).\n\nSee a complete example: [examples/yew-nested-router-example](examples/yew-nested-router-example), which\nyou can run using:\n\n```shell\ntrunk serve examples/yew-nested-router-example/index.html\n```\n\n## Rationale\n\nThis project was born out of [the need for a nesting router](https://github.com/yewstack/yew/issues/1853) using Yew.\nThis used to work in past releases, but starting  with 0.19, the router implementation was swapped out for a new one\nwhich didn't properly support nesting. It still  was possible to [backport](https://github.com/ctron/yew-router) the\nold router to Yew 0.19, using the Yew Agent project.\n\nHowever, in Yew Agent 0.2, which is required by Yew 0.20, the \"context\" agent was removed. So it was no longer possible\nto backport the old router implementation.\n\nThis is a new, from scratch, implementation of a router for Yew. It supports nesting, and using Rust types for routes.\n\n## Goals and opinions\n\nThis is not a drop-in replacement for the old Yew router. This section briefly describes which choices this\nimplementation made:\n\n* The router supports a nested structured, where the child elements don't need to be aware of their parents.\n  This is required in many cases, where one want to re-use lower level routes on different top level routes.\n* Routes are not defined by regular expressions or other pattern matching, but by simply splitting the path of a URL\n  using the forward slash (`/`) into segments.\n* The implementation should try to help avoiding mistakes by using Rust's type system. But it won't fully guard against\n  all mistakes which can be made. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fyew-nested-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Fyew-nested-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fyew-nested-router/lists"}