{"id":14977644,"url":"https://github.com/saltas888/react-router-query-middleware","last_synced_at":"2025-08-15T19:21:14.056Z","repository":{"id":30903670,"uuid":"126334704","full_name":"saltas888/react-router-query-middleware","owner":"saltas888","description":" It adds query object into router reducer when using react-router with connected-react-router","archived":false,"fork":false,"pushed_at":"2022-12-10T02:50:14.000Z","size":1232,"stargazers_count":5,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T01:10:14.200Z","etag":null,"topics":["connected-react-router","react-router","react-router-query","react-router-v4","react-router4"],"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/saltas888.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-22T12:52:11.000Z","updated_at":"2019-09-17T16:59:07.000Z","dependencies_parsed_at":"2023-01-14T17:55:28.192Z","dependency_job_id":null,"html_url":"https://github.com/saltas888/react-router-query-middleware","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saltas888/react-router-query-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltas888%2Freact-router-query-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltas888%2Freact-router-query-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltas888%2Freact-router-query-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltas888%2Freact-router-query-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltas888","download_url":"https://codeload.github.com/saltas888/react-router-query-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltas888%2Freact-router-query-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270617871,"owners_count":24617123,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"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":["connected-react-router","react-router","react-router-query","react-router-v4","react-router4"],"created_at":"2024-09-24T13:56:04.332Z","updated_at":"2025-08-15T19:21:14.008Z","avatar_url":"https://github.com/saltas888.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-query-middleware\n\n[![Download Count](http://img.shields.io/npm/dm/react-router-query-middleware.svg?style=flat-square)](https://npmjs.org/package/react-router-query-middleware)\n[![npm version](https://badge.fury.io/js/react-router-query-middleware.svg)](https://badge.fury.io/js/react-router-query-middleware)\n\n:white_check_mark: A solution for ***[this](https://github.com/ReactTraining/react-router/issues/4410)***\n\n:palm_tree: It adds query object into router reducer when using:\n[React Router v4](https://github.com/ReactTraining/react-router)\n:heavy_plus_sign: [connected-react-router](https://github.com/supasate/connected-react-router)\n\n\n### Installation\n\n```sh\n$ npm install --save react-router-query-middleware\n```\n### Simple usage\nAdd the middleware *after the routerMiddleware* provided from connected-react-router\n\n```js\n...\nimport { routerMiddleware } from 'connected-react-router';\nimport queryMiddleware from 'react-router-query-middleware';\n...\n  const middlewares = [\n    ...\n    thunk, \n    routerMiddleware(history),\n    queryMiddleware(),\n    ...\n    // Add other middlewares here\n  ];\n  \napplyMiddleware(...middlewares);\n...\n```\n* If you use deprecated [react-router-redux](https://github.com/reactjs/react-router-redux) then install v2.0.2\n\n### Advanced usage\nYou can configure *the action name that triggers location change* or *the path of location object in triggered action*\n```js\n...\nqueryMiddleware({\n  actionName: '@@router/LOCATION_CHANGE',\n  actionLocationPath: 'payload.location'\n});\n...\n```\n\n### Options\n| opt | default | type | description |\n| ---- | ---- | ----| ---- |\n| actionName | @@router/LOCATION_CHANGE | string | Action name that triggers location change |\n| actionLocationPath | payload.location | string | Path of location object in triggered action |\n\nLicense\n----\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltas888%2Freact-router-query-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltas888%2Freact-router-query-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltas888%2Freact-router-query-middleware/lists"}