{"id":25182323,"url":"https://github.com/vipcxj/react-router-4-compat","last_synced_at":"2026-05-09T10:13:09.087Z","repository":{"id":57343745,"uuid":"126318140","full_name":"vipcxj/react-router-4-compat","owner":"vipcxj","description":"A wrapped version of react router 4 which compatible with react router 3","archived":false,"fork":false,"pushed_at":"2018-07-09T05:13:02.000Z","size":238,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T13:34:04.641Z","etag":null,"topics":["react","react-router","react-router-v3","react-router-v4"],"latest_commit_sha":null,"homepage":null,"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/vipcxj.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":"2018-03-22T10:25:11.000Z","updated_at":"2018-07-09T05:13:03.000Z","dependencies_parsed_at":"2022-09-12T06:50:59.971Z","dependency_job_id":null,"html_url":"https://github.com/vipcxj/react-router-4-compat","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vipcxj%2Freact-router-4-compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vipcxj%2Freact-router-4-compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vipcxj%2Freact-router-4-compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vipcxj%2Freact-router-4-compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vipcxj","download_url":"https://codeload.github.com/vipcxj/react-router-4-compat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247130321,"owners_count":20888566,"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-router","react-router-v3","react-router-v4"],"created_at":"2025-02-09T17:31:45.016Z","updated_at":"2026-05-09T10:13:04.067Z","avatar_url":"https://github.com/vipcxj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-4-compat \u0026middot; ![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg) [![npm version](https://img.shields.io/npm/v/react-router-4-compat.svg?style=flat)](https://www.npmjs.com/package/react-router-4-compat)\n\nA wrapped version compatible with version 3 for [React-Router-4](https://reacttraining.com/react-router/).\nThis project is based on react router 4. So you can use any react router 4 component together with this library.\n\n## Installation\n\nUsing [npm](https://www.npmjs.com/):\n\n    $ npm install --save react-router-4-compat\n    \n```jsx harmony\nimport { Router4Compat as Router } from 'react-router-4-compat';\n\nconst Demo = () =\u003e {\n    const App = ({ children }) =\u003e (\n      \u003cdiv\u003e\n        \u003ch1\u003eApp\u003c/h1\u003e\n        \u003cul\u003e\n          \u003cli\u003e\u003cLink to=\"/about\"\u003eAbout\u003c/Link\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cLink to=\"/inbox\"\u003eInbox\u003c/Link\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        {children}\n      \u003c/div\u003e\n    );\n    const About = () =\u003e \u003ch3\u003eAbout\u003c/h3\u003e;\n    const Inbox = ({ children }) =\u003e (\n      \u003cdiv\u003e\n        \u003ch2\u003eInbox\u003c/h2\u003e\n        {children || 'Welcome to your Inbox'}\n      \u003c/div\u003e\n    );\n    const Message = ({ params }) =\u003e \u003ch3\u003eMessage {params.id}\u003c/h3\u003e;\n    const routes = {\n      path: '/',\n      component: App,\n      childRoutes: [\n        {\n          path: 'about',\n          component: About,\n        },\n        {\n          path: 'inbox',\n          component: Inbox,\n          childRoutes: [{\n            path: 'messages/:id',\n            component: Message,\n          }],\n        },\n      ],\n    };\n    return \u003cRouter routes={routes} history={createBrowserHistory('/')} /\u003e;\n  }\n\n```\n\n## Progress\n\n- Only plain route config is supported at this moment.\n- static and Dynamic route config have all been supported. \n- components and getComponents are supported, but without test.\n- components and getComponents are not permitted in the root route config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvipcxj%2Freact-router-4-compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvipcxj%2Freact-router-4-compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvipcxj%2Freact-router-4-compat/lists"}