{"id":16052208,"url":"https://github.com/gregnb/simple-react-router","last_synced_at":"2026-04-13T21:31:57.769Z","repository":{"id":66150668,"uuid":"75842157","full_name":"gregnb/simple-react-router","owner":"gregnb","description":"This is a simple client side ONLY React Router","archived":false,"fork":false,"pushed_at":"2016-12-08T16:07:55.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T16:41:43.706Z","etag":null,"topics":["javascript","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gregnb.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-07T14:11:24.000Z","updated_at":"2017-03-10T01:22:25.000Z","dependencies_parsed_at":"2023-03-10T23:40:37.113Z","dependency_job_id":null,"html_url":"https://github.com/gregnb/simple-react-router","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"69dfb5a99b41c8c8951987e595134c36dbe7b632"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregnb/simple-react-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregnb%2Fsimple-react-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregnb%2Fsimple-react-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregnb%2Fsimple-react-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregnb%2Fsimple-react-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregnb","download_url":"https://codeload.github.com/gregnb/simple-react-router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregnb%2Fsimple-react-router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"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":["javascript","react"],"created_at":"2024-10-09T01:08:05.270Z","updated_at":"2026-04-13T21:31:57.743Z","avatar_url":"https://github.com/gregnb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-react-router\nThis is a simple client side ONLY React Router\n\n\nInstallation\n------------\nJust download SimpleRouter.min.js (3KB minified) and include it with a script tag like this:\n```html\n\u003cscript type=\"text/javascript\" language=\"javascript\" src=\"SimpleRouter.min.js\" charset=\"utf-8\"\u003e\u003c/script\u003e\n```\n\nRouter Configuration\n--------------------\nThe routing configuration is very straight forward. You simply define the paths and tie components to them! Path value of * is used for Index. \n\nHere is the example config that's found in the sample code inside of example/\n\n```html\n\n/* Tie path to Components */\nvar routing = (\n\t\u003cRouter root=\"/simple-react-router/example/\"\u003e\n\t\t\u003cRoute path=\"*\" component={\u003cIndex /\u003e} /\u003e\n\t\t\u003cRoute path=\"category\" component={\u003cCategory /\u003e} /\u003e\n\t\t\u003cRoute path=\"product\" component={\u003cProduct /\u003e} /\u003e\n\t\t\u003cRoute path=\"support\"\u003e\n\t\t\t\u003cRoute path=\"/faqs\" component={\u003cSupport page=\"faqs\" /\u003e} /\u003e\n\t\t\t\u003cRoute path=\"/contact\" component={\u003cSupport page=\"contact\" /\u003e} /\u003e\n \t\t\u003c/Route\u003e\n\t\u003c/Router\u003e\n);\n\t\n/* Structure main app */\nvar App = ( \n\t\u003cdiv id=\"viewport\"\u003e\n\t\t{routing}\n\t\u003c/div\u003e\n);\n\n/* Render to DOM */\nReactDOM.render(App, document.getElementById('app-root'));\n\n```\n\n\nThe Routing configuration above will render the following:\n\nURL                     | Component\n------------------------|-----------\n*/*                   \t| **Index**\n*/category*             | **Category**\n*/product*          \t| **Product**\n*/support/faqs*  \t| **Support -\u003e FAQs**\n*/support/contact*   \t| **Support -\u003e Contact**\n\n\nHow to change Routes\n--------------------\n\nTo change routing from any place within your app simply call window.router.changeRoute(path). Example usage:\n\n```html\n\nhandleClick: function(route, event) {\n\t\n\tevent.preventDefault();\n\tevent.stopPropagation(); \t\n\t\n\twindow.router.changeRoute('/product');\n\t\t\t\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregnb%2Fsimple-react-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregnb%2Fsimple-react-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregnb%2Fsimple-react-router/lists"}