{"id":15065315,"url":"https://github.com/charlesstover/with-router","last_synced_at":"2025-10-05T08:30:35.961Z","repository":{"id":33201868,"uuid":"154895745","full_name":"CharlesStover/with-router","owner":"CharlesStover","description":"A pub-sub alternative HOC to react-router's withRouter HOC.","archived":true,"fork":false,"pushed_at":"2022-03-24T04:21:09.000Z","size":143,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T09:26:35.875Z","etag":null,"topics":["npm","npmjs","react","react-router","reactjs","travis","travis-ci","travisci"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/with-router","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/CharlesStover.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-10-26T21:20:23.000Z","updated_at":"2024-02-26T08:08:40.000Z","dependencies_parsed_at":"2022-08-07T20:15:24.127Z","dependency_job_id":null,"html_url":"https://github.com/CharlesStover/with-router","commit_stats":null,"previous_names":["quisido/with-router","charlesstover/with-router"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesStover%2Fwith-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesStover%2Fwith-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesStover%2Fwith-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesStover%2Fwith-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesStover","download_url":"https://codeload.github.com/CharlesStover/with-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235378507,"owners_count":18980460,"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":["npm","npmjs","react","react-router","reactjs","travis","travis-ci","travisci"],"created_at":"2024-09-25T00:36:40.047Z","updated_at":"2025-10-05T08:30:30.535Z","avatar_url":"https://github.com/CharlesStover.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# withRouter [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Do%20you%20wish%20that%20withRouter%20would%20rerender%20your%20component%20when%20your%20route%20changes?%20Now%20it%20can%20with%20the%20with-router%20NPM%20package!\u0026url=https://github.com/CharlesStover/with-router\u0026via=CharlesStover\u0026hashtags=react,reactjs,javascript,webdev,webdeveloper,webdevelopment)\n\nA pub-sub alternative HOC to `react-router`'s `withRouter` HOC. It functions exactly the same way, except the wrapped component will re-render when the route changes. This is beneficial if your view changes depending on the current path.\n\n[![version](https://img.shields.io/npm/v/with-router.svg)](https://www.npmjs.com/package/with-router)\n[![minified size](https://img.shields.io/bundlephobia/min/with-router.svg)](https://www.npmjs.com/package/with-router)\n[![minzipped size](https://img.shields.io/bundlephobia/minzip/with-router.svg)](https://www.npmjs.com/package/with-router)\n[![downloads](https://img.shields.io/npm/dt/with-router.svg)](https://www.npmjs.com/package/with-router)\n[![build](https://api.travis-ci.com/CharlesStover/with-router.svg)](https://travis-ci.com/CharlesStover/with-router/)\n\n## Install\n\n* `npm install with-router --save` or\n* `yarn add with-router`\n\n## Use\n\nUse it the same way you would use `react-router`'s built-in `withRouter` HOC!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesstover%2Fwith-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesstover%2Fwith-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesstover%2Fwith-router/lists"}