{"id":15793834,"url":"https://github.com/sital002/react-routing","last_synced_at":"2025-07-02T06:03:47.588Z","repository":{"id":216423305,"uuid":"740416184","full_name":"sital002/react-routing","owner":"sital002","description":"A simple and light weight routing library for react ","archived":false,"fork":false,"pushed_at":"2024-01-10T04:29:44.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T00:05:43.563Z","etag":null,"topics":["react","react-routing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@sital002/react-routing","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sital002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-08T09:54:56.000Z","updated_at":"2024-01-12T10:15:46.000Z","dependencies_parsed_at":"2024-01-10T07:15:50.823Z","dependency_job_id":null,"html_url":"https://github.com/sital002/react-routing","commit_stats":null,"previous_names":["sital002/react-routing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sital002/react-routing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sital002%2Freact-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sital002%2Freact-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sital002%2Freact-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sital002%2Freact-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sital002","download_url":"https://codeload.github.com/sital002/react-routing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sital002%2Freact-routing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263083562,"owners_count":23411162,"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":["react","react-routing"],"created_at":"2024-10-04T23:21:23.259Z","updated_at":"2025-07-02T06:03:47.560Z","avatar_url":"https://github.com/sital002.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple and light weight routing library for react\n\n```bash\nnpm i @sital002/react-routing\n```\n\n## How to implement it\n\nApp.jsx\n\n```jsx\nimport { BrowserRouter, Route, Routes } from \"@sital002/react-routing\";\nimport Footer from \"./components/Footer\";\nimport Navbar from \"./components/Navbar\";\nimport About from \"./pages/About\";\nimport Contact from \"./pages/Contact\";\nimport Home from \"./pages/Home\";\n\nfunction App() {\n  return (\n    \u003c\u003e\n      \u003cBrowserRouter\u003e\n        \u003cNavbar /\u003e\n        \u003cRoutes\u003e\n          \u003cRoute path=\"/\" element={\u003cHome /\u003e} /\u003e\n          \u003cRoute path=\"/about\" element={\u003cAbout /\u003e} /\u003e\n          \u003cRoute path=\"/contact\" element={\u003cContact /\u003e} /\u003e\n        \u003c/Routes\u003e\n        \u003cFooter /\u003e\n      \u003c/BrowserRouter\u003e\n    \u003c/\u003e\n  );\n}\n\nexport default App;\n```\n\nNavbar.jsx\n\n```jsx\nimport { Link } from \"@sital002/react-routing\";\n\nfunction Navbar() {\n  return (\n    \u003cdiv\u003e\n      \u003cul\u003e\n        \u003cLink to=\"/\"\u003e\n          \u003cli\u003eHome\u003c/li\u003e\n        \u003c/Link\u003e\n        \u003cLink to=\"/about\"\u003e\n          \u003cli\u003eAbout\u003c/li\u003e\n        \u003c/Link\u003e\n        \u003cLink to=\"/contact\"\u003e\n          \u003cli\u003eContact\u003c/li\u003e\n        \u003c/Link\u003e\n      \u003c/ul\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default Navbar;\n```\n\nuseRouter()\n\n```jsx\nimport { useRouter } from \"@sital002/react-routing\";\nimport React from \"react\";\n\nexport default function Footer() {\n  const router = useRouter();\n  return (\n    \u003cdiv\u003e\n      \u003cbutton\n        onClick={() =\u003e {\n          router.push(\"/\");\n        }}\n      \u003e\n        Home\n      \u003c/button\u003e\n      \u003cbutton\n        onClick={() =\u003e {\n          router.push(\"/about\");\n        }}\n      \u003e\n        About\n      \u003c/button\u003e\n      \u003cbutton\n        onClick={() =\u003e {\n          router.push(\"/contact\");\n        }}\n      \u003e\n        Contact\n      \u003c/button\u003e\n\n      \u003cbutton\n        onClick={() =\u003e {\n          router.back();\n        }}\n      \u003e\n        Go back\n      \u003c/button\u003e\n      \u003cbutton\n        onClick={() =\u003e {\n          router.forward();\n        }}\n      \u003e\n        Go forward\n      \u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsital002%2Freact-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsital002%2Freact-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsital002%2Freact-routing/lists"}