{"id":13671051,"url":"https://github.com/arjenhill/beerouter","last_synced_at":"2026-03-13T10:33:09.789Z","repository":{"id":86805176,"uuid":"233608019","full_name":"arjenhill/beerouter","owner":"arjenhill","description":"BeeRouter is a small and exquisite React Router for mobile web project .","archived":false,"fork":false,"pushed_at":"2020-10-12T06:43:00.000Z","size":740,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T05:26:57.044Z","etag":null,"topics":["bee-router","react-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/arjenhill.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}},"created_at":"2020-01-13T13:58:40.000Z","updated_at":"2020-10-13T13:07:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"f51136e1-88a3-4be8-96dd-9c051c0fe185","html_url":"https://github.com/arjenhill/beerouter","commit_stats":null,"previous_names":["halldwang/bee-router","arjenhill/beerouter","climbwood/beerouter","halldwang/beerouter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arjenhill/beerouter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjenhill%2Fbeerouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjenhill%2Fbeerouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjenhill%2Fbeerouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjenhill%2Fbeerouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjenhill","download_url":"https://codeload.github.com/arjenhill/beerouter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjenhill%2Fbeerouter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30465432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T06:34:02.089Z","status":"ssl_error","status_checked_at":"2026-03-13T06:33:49.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bee-router","react-router"],"created_at":"2024-08-02T09:00:57.207Z","updated_at":"2026-03-13T10:33:09.772Z","avatar_url":"https://github.com/arjenhill.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## Overview\n\nEnglish | [简体中文](./README_ZH.md)\n\n🦋 Bee router is a small and exquisite React Router for mobile web project, with only 200 lines of code. Different with react-router，bee router has the following advantages:\n\n- Over ten times smaller volume, which makes it is suitable for mobile web projects with limit of code lines.\n- Bee router has the same basic functions with react router, such as route switching and routing events etc. , but reducing rarely-used functions in react router.\n- Unlike react router which repeatedly initializes components, bee-router only needs to be initialized once, which greatly saves resources.\n\n## Usage\n\n[Example](https://ilgei.github.io/beerouter/)\n\n![img](./example.gif)\n\n## Installation\n\nFirst step:\n\n[![bee-router](https://nodei.co/npm/beerouter.png)](https://npmjs.org/package/beerouter)\n\n```js\nnpm install beerouter --save\n```\n\nThe second step:\n\n```js\nimport React from \"react\";\nimport Comp1 from \"./comp/Comp1.jsx\";\nimport Comp2 from \"./comp/Comp2.jsx\";\nimport { BeeRouter, BeeRouterEmitter } from \"bee-router\";\n\nfunction clickHandler(item) {\n  BeeRouter.push(\"/comp\" + item);\n}\n\nfunction App() {\n  BeeRouterEmitter.on(\"router-change\", path =\u003e {\n    console.log(path);\n  });\n\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cdiv className=\"nav\"\u003e\n        \u003cdiv onClick={clickHandler.bind(null, 1)}\u003e导航1\u003c/div\u003e\n        \u003cdiv onClick={clickHandler.bind(null, 2)}\u003e导航2\u003c/div\u003e\n      \u003c/div\u003e\n\n      \u003cdiv\u003e\n        \u003cBeeRouter path=\"/comp1\" component={Comp1} index=\"default\" /\u003e\n        \u003cBeeRouter path=\"/comp2\" component={Comp2} /\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjenhill%2Fbeerouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjenhill%2Fbeerouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjenhill%2Fbeerouter/lists"}