{"id":18924508,"url":"https://github.com/sharpcoder/react-basic-router","last_synced_at":"2026-05-17T11:34:53.803Z","repository":{"id":57332909,"uuid":"90334752","full_name":"SharpCoder/react-basic-router","owner":"SharpCoder","description":"A basic hash router for react.","archived":false,"fork":false,"pushed_at":"2018-02-17T21:12:46.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T06:32:45.173Z","etag":null,"topics":["react","router","routing-controllers","view"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-basic-router","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/SharpCoder.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}},"created_at":"2017-05-05T03:47:39.000Z","updated_at":"2023-09-29T00:15:42.000Z","dependencies_parsed_at":"2022-08-24T18:41:43.311Z","dependency_job_id":null,"html_url":"https://github.com/SharpCoder/react-basic-router","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Freact-basic-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Freact-basic-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Freact-basic-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpCoder%2Freact-basic-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharpCoder","download_url":"https://codeload.github.com/SharpCoder/react-basic-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921875,"owners_count":19718842,"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","router","routing-controllers","view"],"created_at":"2024-11-08T11:07:02.085Z","updated_at":"2026-03-14T03:30:20.955Z","avatar_url":"https://github.com/SharpCoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Basic Router\n[![Build Status](https://travis-ci.org/SharpCoder/react-basic-router.svg?branch=master)](https://travis-ci.org/SharpCoder/react-basic-router) [![Coverage Status](https://coveralls.io/repos/github/SharpCoder/react-basic-router/badge.svg)](https://coveralls.io/github/SharpCoder/react-basic-router)\n\nA fast and minimal view router written in react which responds to hash navigation.\n\n\n## Getting Started\n\nReact basic router is just javascript, it can be webpacked or required as you like.\n\nThis is how you can install it.\n\n```bash\nnpm install --save react-basic-router\n```\n\n## Example\n\nIn this eample, I assume \"About\" and \"MainView\" are react components. To load them, simply navigate normally to one of the hash links.\n\n```jsx\nimport React from 'react';\nimport { Router, Route, ErrorRoute } from 'react-basic-router';\n\nclass App extends React.Component {\n  render() {\n    return(\u003cdiv\u003e\n      \u003cRouter\u003e\n\t\u003cRoute hash=\"#/\" component={MainView} absolute /\u003e\n\t\u003cRoute hash=\"#/about\" component={About} title={\"Hey look, I can pass props\"} /\u003e\n\t\u003cErrorRoute component={MissingFilePage} /\u003e\n      \u003c/Router\u003e\n    \u003c/div\u003e);\n  }\n}\n```\n\n* You can add _absolute_ to any route and it will not allow partial parameter matching. Without _absolute_, you can pass in querystring values in addition to the base route and it will still match just fine. In this way, you could navigate to (for example) mysite.com/#docs?findText=example\n* All props other than component and hash, will be passed through to the underlying component.\n* ErrorRoute will load when a page cannot be matched.\n\n\n\n### Built With\n\n* babel\n* gulp\n\nTo build the project, run the following commands\n```shell\nnpm install\nnpm install -g gulp\ngulp\n```\n\n\n### Author\n\nSharpCoder aka Joshua Cole\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Freact-basic-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpcoder%2Freact-basic-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpcoder%2Freact-basic-router/lists"}