{"id":23120278,"url":"https://github.com/dragos-tudor/frontend-routing","last_synced_at":"2026-04-24T16:34:28.017Z","repository":{"id":208084130,"uuid":"720695081","full_name":"dragos-tudor/frontend-routing","owner":"dragos-tudor","description":"Rewritten React router library [functional principles].","archived":false,"fork":false,"pushed_at":"2025-04-23T11:45:46.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T12:35:52.362Z","etag":null,"topics":["functional","functional-components","functional-programming","react-router","router"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dragos-tudor.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,"zenodo":null}},"created_at":"2023-11-19T09:55:45.000Z","updated_at":"2025-04-23T11:45:49.000Z","dependencies_parsed_at":"2024-04-10T17:44:48.452Z","dependency_job_id":"1e3676d4-24e5-4e31-86d7-fe393952660e","html_url":"https://github.com/dragos-tudor/frontend-routing","commit_stats":null,"previous_names":["dragos-tudor/frontend-routing"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dragos-tudor/frontend-routing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragos-tudor%2Ffrontend-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragos-tudor%2Ffrontend-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragos-tudor%2Ffrontend-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragos-tudor%2Ffrontend-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragos-tudor","download_url":"https://codeload.github.com/dragos-tudor/frontend-routing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragos-tudor%2Ffrontend-routing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32231019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["functional","functional-components","functional-programming","react-router","router"],"created_at":"2024-12-17T06:09:38.071Z","updated_at":"2026-04-24T16:34:27.997Z","avatar_url":"https://github.com/dragos-tudor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Frontend routing library\n- simplified React-Router like library.\n- Deno-based routing library [Node-free].\n- functional-style library [OOP-free].\n\n### Usage\n```javascript\nimport { render, registerLinkeDomParser } from \"/scripts/rendering.js\"\nimport { Router, Route, NavLink, navigate } from \"/scripts/routing.js\"\n\nawait registerLinkeDomParser()\n\nconst loadSpecialOffer = async () =\u003e {\n    const {SpecialOffer} = await import(\"/components/special-offer.jsx\");\n    return \u003cSpecialOffer\u003e\u003c/SpecialOffer\u003e;\n}\n\nconst Home = () =\u003e \u003cdiv\u003e{\"home\"}\u003c/div\u003e\nconst Contact = () =\u003e \u003cdiv\u003e{\"contact\"}\u003c/div\u003e\n\nexport const App = () =\u003e {\n  return (\n    \u003cRouter __log={[\"routing\"]}\u003e\n      \u003cnav\u003e\n        \u003cNavLink href=\"/home\"\u003e{\"Home\"}\u003c/NavLink\u003e\n        \u003cNavLink href=\"/contact\"\u003e{\"Contact\"}\u003c/NavLink\u003e\n        \u003cNavLink href=\"/special-offer\"\u003e{\"Special offer\"}\u003c/NavLink\u003e\n      \u003c/nav\u003e\n      \u003cmain\u003e\n        \u003cRoute path=\"/home\" child={\u003cHome\u003e\u003c/Home\u003e} index\u003e\u003c/Route\u003e\n        \u003cRoute path=\"/contact\" child={\u003cContact\u003e\u003c/Contact\u003e}\u003e\u003c/Route\u003e\n        \u003cRoute path=\"/special-offer\" load={loadSpecialOffer}\u003e\u003c/Route\u003e\n      \u003c/main\u003e\n    \u003c/Router\u003e\n  )\n}\n\nrender(\u003cApp\u003e\u003c/App\u003e, document.body)\nnavigate(document.querySelector(\"router\"), \"/\")\n```\n\n### Modules\n- *high-level modules*: routing, routing-components.\n- *low-level modules*: routing-html, routing-locations, routing-params, routing-urls.\n- *low-level modules* completely independent [\"parallel\" modules].\n\n### [Routing](./routing/)\n- main functionality: route navigation, change routes, update routing consumers.\n- `navigateToRoute`:\n  - for current element find html root.\n  - store location, search params, history [skipped by `navigateFromHistory`].\n  - change routes starting from root [`changeRoutes`].\n  - update **current path** routing consumers starting from root.\n- `changeRoutes`:\n  - find matching route for url.\n  - store route params.\n  - show matched route, hide sibling routes.\n  - show route static child (jsx factory) or dynamic loaded child.\n  - remove route path from url.\n  - change descendant routes with remaining url.\n\n### [Components](./routing-components/)\n- main functionality: implement routing components.\n- `Router`:\n  - register `popstate` event handler `navigateToHistoryRoute`.\n  - register `navigate` event handler `navigateToRoute`.\n- `Route`: set static (jsx factory) or dynamic loading function.\n- `NavLink`: on click raise `navigate` event.\n\n### [Routes](./routing-routes/)\n- main functionality: implement route operations.\n  - find and toogle routes.\n  - render routes children.\n  - find route siblings.\n  - manage routes data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragos-tudor%2Ffrontend-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragos-tudor%2Ffrontend-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragos-tudor%2Ffrontend-routing/lists"}