{"id":13422425,"url":"https://github.com/STRML/react-router-component","last_synced_at":"2025-03-15T12:30:42.120Z","repository":{"id":13683324,"uuid":"16377100","full_name":"STRML/react-router-component","owner":"STRML","description":"Declarative router component for React.","archived":false,"fork":false,"pushed_at":"2023-07-18T20:27:34.000Z","size":1598,"stargazers_count":869,"open_issues_count":54,"forks_count":84,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-11T09:18:27.216Z","etag":null,"topics":["react","router","routing"],"latest_commit_sha":null,"homepage":"http://strml.viewdocs.io/react-router-component","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/STRML.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-01-30T12:47:47.000Z","updated_at":"2025-03-05T16:30:27.000Z","dependencies_parsed_at":"2024-01-07T18:07:11.177Z","dependency_job_id":null,"html_url":"https://github.com/STRML/react-router-component","commit_stats":{"total_commits":487,"total_committers":27,"mean_commits":"18.037037037037038","dds":0.5133470225872689,"last_synced_commit":"0b39da52dd248f30385ab60d613ac948bb2158ca"},"previous_names":[],"tags_count":96,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRML%2Freact-router-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRML%2Freact-router-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRML%2Freact-router-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STRML%2Freact-router-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/STRML","download_url":"https://codeload.github.com/STRML/react-router-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730949,"owners_count":20338745,"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"],"created_at":"2024-07-30T23:00:44.518Z","updated_at":"2025-03-15T12:30:41.737Z","avatar_url":"https://github.com/STRML.png","language":"JavaScript","readme":"# React Router Component\n\n[![TravisCI Build Status](https://travis-ci.org/STRML/react-router-component.svg?branch=master)](https://travis-ci.org/STRML/react-router-component)\n\n\n|Version        | Compatibility|\n|---------------|--------------|\n|\u003e= 0.39.0      | React v15,16 |\n|\u003e= 0.32.0      | React v15    |\n|\u003e= 0.27.0      | React 0.14   |\n|0.24 - 0.26.0  | React 0.13   |\n|0.23 - 0.26.0  | React 0.12   |\n|0.20 - 0.22.2  | React 0.11   |\n|\u003c 0.20         | React 0.10   |\n\nReact router component allows you to define routes in your [React][] application\nin a declarative manner, directly as a part of your component hierarchy.\n\n## Project Overview\n\nUsage is as simple as just returning a configured router component from your\ncomponent's `render()` method:\n\n    \u003cLocations\u003e\n      \u003cLocation path=\"/\" handler={MainPage} /\u003e\n      \u003cLocation path=\"/users/:username\" handler={UserPage} /\u003e\n      \u003cLocation path=\"/search/*\" handler={SearchPage} /\u003e\n      \u003cLocation path={/\\/product\\/([0-9]*)/} handler={ProductPage} /\u003e\n    \u003c/Locations\u003e\n\nHaving routes defined as a part of your component hierarchy allows to\ndynamically reconfigure routing based on your application state. For example you\ncan return a different set of allowed locations for anonymous and signed-in\nusers.\n\nReact router component can dispatch based on `location.pathname` or\n`location.hash` if browser doesn't support History API (see [hash routing][hash-routing]).\n\nProps can be passed through the router by setting them directly on each `\u003cLocation\u003e`, or to all possible routes\nvia a `childProps` hash.\n\nFurthermore it provides advanced features like support for [regex matching][regex],\n[full page server side rendering][server-side], [multiple routers][multiple] on the same page,\n[querystring parsing][querystring], and [contextual routers][contextual].\n\nIts functionality is tested using [Saucelabs][] on all modern browsers (IE \u003e= 9,\nChrome \u003e= 27, Firefox \u003e= 25, Safari \u003e= 6 and Mobile Safari on iPhone and iPad \u003e=\n6).\n\nIts size is about 3.5kb gzipped.\n\n## Installation\n\nReact router component is packaged on npm:\n\n    % npm install react-router-component\n\n## Docs\n\n* [Overview and Usage][docs]\n* [Implementation Visualization][implementation]\n* [Hash Routing][hash-routing]\n* [Parsing Query Strings][querystring]\n* [Server-side Rendering][server-side]\n* [Multiple Routers][multiple]\n* [Contextual Routers][contextual]\n* [Capturing Clicks on Anchor Elements][a-elements]\n* [A custom Link Component][rec-custom-link]\n* [A custom Router Component][rec-custom-router]\n* [An Animated Router Component with ES6][rec-es6-custom-router]\n* [Overriding URL-Pattern's Compiler][override-url-pattern]\n\n[hash-routing]: http://strml.viewdocs.io/react-router-component/hash-routing\n[regex]: http://strml.viewdocs.io/react-router-component#user-content-regular-expressions\n[server-side]: http://strml.viewdocs.io/react-router-component/server-side\n[multiple]: http://strml.viewdocs.io/react-router-component/multiple\n[contextual]: http://strml.viewdocs.io/react-router-component/contextual\n[querystring]: http://strml.viewdocs.io/react-router-component/querystring\n[a-elements]: http://strml.viewdocs.io/react-router-component/a-elements\n[rec-custom-link]: http://strml.viewdocs.io/react-router-component/recipes/custom-link\n[rec-custom-router]: http://strml.viewdocs.io/react-router-component/recipes/custom-router\n[rec-es6-custom-router]: http://strml.viewdocs.io/react-router-component/recipes/es6-custom-router\n[override-url-pattern]: http://strml.viewdocs.io/react-router-component/override-url-pattern\n[implementation]: http://strml.viewdocs.io/react-router-component/implementation\n\n[docs]: http://strml.viewdocs.io/react-router-component\n[React]: http://facebook.github.io/react/\n[React-Refs]: http://facebook.github.io/react/docs/more-about-refs.html\n[React-Shims]: http://facebook.github.io/react/docs/working-with-the-browser.html#polyfills-needed-to-support-older-browsers\n[Saucelabs]: https://saucelabs.com\n","funding_links":[],"categories":["Code Design","Uncategorized","JavaScript","Awesome React"],"sub_categories":["Router","Uncategorized","Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSTRML%2Freact-router-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSTRML%2Freact-router-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSTRML%2Freact-router-component/lists"}