{"id":19603775,"url":"https://github.com/lin-xi/react-xrouter","last_synced_at":"2026-06-13T00:32:35.592Z","repository":{"id":71694897,"uuid":"52270551","full_name":"lin-xi/react-xrouter","owner":"lin-xi","description":"react router","archived":false,"fork":false,"pushed_at":"2016-02-22T12:52:34.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T15:48:30.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lin-xi.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}},"created_at":"2016-02-22T12:01:45.000Z","updated_at":"2016-02-22T12:52:37.000Z","dependencies_parsed_at":"2023-05-06T10:23:15.215Z","dependency_job_id":null,"html_url":"https://github.com/lin-xi/react-xrouter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lin-xi/react-xrouter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lin-xi%2Freact-xrouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lin-xi%2Freact-xrouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lin-xi%2Freact-xrouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lin-xi%2Freact-xrouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lin-xi","download_url":"https://codeload.github.com/lin-xi/react-xrouter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lin-xi%2Freact-xrouter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34268187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-11T09:32:38.756Z","updated_at":"2026-06-13T00:32:35.568Z","avatar_url":"https://github.com/lin-xi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"React-XRouter\n====\n\n\u003eReact-XRouter 是一个类似ReactRouter的类库。\n\n--------\n\t\n##依赖\n    \u003clabel\u003e无\u003c/label\u003e\n    \n--------\n\t\n##安装：\n    \u003enpm install react-xrouter --save\n\t\n--------\n## 使用\n\n```\n\nvar Router = require('react-xrouter');\n\nRouter.route({\n\t'/': {\n\t\tenter: function () {\n\t\t\trequire.ensure([], function(require){\n\t\t\t\t//可以做些统计写日志的工作\n    \t\t\tvar HomePage = require('./pages/home/HomePage.js');\n\t\t\t\tReactDOM.render(\u003cHomePage/\u003e, document.querySelector('#pinzhi'));\n\t\t\t});\n\t\t}\n\t},\n\t'/detail/:id': {\n\t\tenter: function (param) {\n\t\t\trequire.ensure([], function(require){\n    \t\t\tvar DetailPage = require('./pages/detail/DetailPage.js');\n\t\t\t\tReactDOM.render(\u003cDetailPage params={param}/\u003e, document.querySelector('#pinzhi'));\n\t\t\t});\n\t\t},\n\t\tleave: function(){\n\t\t\n\t\t}\n\t},\n\t'default': {\n\t\tredirect: '/'\n\t}\n});\n\n\n```\n\n--------\n## API\n\n```\n\nvar Router = require('react-xrouter');\n\nRouter.back();\n\nRouter.redirect(path);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin-xi%2Freact-xrouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flin-xi%2Freact-xrouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin-xi%2Freact-xrouter/lists"}