{"id":19180138,"url":"https://github.com/hoppula/react-router-redux-params","last_synced_at":"2025-05-07T22:05:35.441Z","repository":{"id":57343838,"uuid":"53423338","full_name":"hoppula/react-router-redux-params","owner":"hoppula","description":"Adds react-router params to redux in addition to location","archived":false,"fork":false,"pushed_at":"2017-08-30T22:11:56.000Z","size":11,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-21T22:50:58.180Z","etag":null,"topics":["react","react-router","redux"],"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/hoppula.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-03-08T15:33:13.000Z","updated_at":"2023-08-23T11:25:35.000Z","dependencies_parsed_at":"2022-09-12T07:00:31.159Z","dependency_job_id":null,"html_url":"https://github.com/hoppula/react-router-redux-params","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoppula%2Freact-router-redux-params","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoppula%2Freact-router-redux-params/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoppula%2Freact-router-redux-params/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoppula%2Freact-router-redux-params/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoppula","download_url":"https://codeload.github.com/hoppula/react-router-redux-params/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223817819,"owners_count":17207947,"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","redux"],"created_at":"2024-11-09T10:48:14.651Z","updated_at":"2024-11-09T10:48:15.378Z","avatar_url":"https://github.com/hoppula.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-redux-params\n\nProvides extra methods for [react-router-redux](https://github.com/reactjs/react-router-redux) which store [react-router](https://github.com/reactjs/react-router) route params in addition to history location object.\n\nYou won't need this if you're only accessing route params inside your components, react-router already provides params as a prop. This is meant for usage outside component tree, for example with [refire](https://github.com/hoppula/refire).\n\n**NOTE** This hasn't been tested with [redux-devtools](https://github.com/gaearon/redux-devtools), breakage might ensue.\n\n## Usage\n\n```js\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport { Provider } from 'react-redux'\nimport { Router, Route, browserHistory } from 'react-router'\nimport { syncHistory, syncParams, routeParamsReducer } from 'react-router-redux-params'\nimport reducers from '\u003cproject-path\u003e/reducers'\n\nconst routes = (\n  \u003cRoute path=\"foo\" component={Foo}/\u003e\n  \u003cRoute path=\"bar\" component={Bar}/\u003e\n)\n\nconst reducer = combineReducers(Object.assign({}, reducers, {\n  routing: routeParamsReducer\n}))\n\n// Sync dispatched route actions to the history\nconst createStoreWithMiddleware = applyMiddleware(\n  syncHistory(browserHistory)\n)(createStore)\n\nconst store = createStoreWithMiddleware(reducer)\n// syncParams also accepts custom action creator as fourth parameter, see src/index.js for more info\nsyncParams(store, routes, browserHistory)\n\nReactDOM.render(\n  \u003cProvider store={store}\u003e\n    \u003cRouter history={browserHistory}\u003e\n      \u003cRoute path=\"/\" component={App}\u003e\n        {routes}\n      \u003c/Route\u003e\n    \u003c/Router\u003e\n  \u003c/Provider\u003e,\n  document.getElementById('mount')\n)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoppula%2Freact-router-redux-params","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoppula%2Freact-router-redux-params","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoppula%2Freact-router-redux-params/lists"}