{"id":17277663,"url":"https://github.com/llleeeaaannn/scroll-to-top-react-router","last_synced_at":"2026-05-03T10:37:14.696Z","repository":{"id":65542058,"uuid":"593719199","full_name":"llleeeaaannn/scroll-to-top-react-router","owner":"llleeeaaannn","description":"NPM Package to enable scroll to top on navigate for React Router DOM while maintaining scroll for previous pages on use of Back button.","archived":false,"fork":false,"pushed_at":"2023-01-28T14:32:40.000Z","size":1347,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T13:22:49.573Z","etag":null,"topics":["npm","react","react-router"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/scroll-to-top-react-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/llleeeaaannn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-26T17:29:16.000Z","updated_at":"2023-01-28T13:56:02.000Z","dependencies_parsed_at":"2023-02-15T17:01:01.970Z","dependency_job_id":null,"html_url":"https://github.com/llleeeaaannn/scroll-to-top-react-router","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"4d051ae0eb6633c254bff564e6340a7559e79927"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/llleeeaaannn/scroll-to-top-react-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llleeeaaannn%2Fscroll-to-top-react-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llleeeaaannn%2Fscroll-to-top-react-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llleeeaaannn%2Fscroll-to-top-react-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llleeeaaannn%2Fscroll-to-top-react-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llleeeaaannn","download_url":"https://codeload.github.com/llleeeaaannn/scroll-to-top-react-router/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llleeeaaannn%2Fscroll-to-top-react-router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017381,"owners_count":26086052,"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-10-13T02:00:06.723Z","response_time":61,"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":["npm","react","react-router"],"created_at":"2024-10-15T09:09:37.905Z","updated_at":"2025-10-14T00:09:17.866Z","avatar_url":"https://github.com/llleeeaaannn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll to Top on Navigate for React Router\n\nCreates automatic scroll-to-top behaviour when the route changes. The package also preserves previous pages' scroll position upon navigating back with the Back button.\n\nWorks with the latest version of [React Router](https://reactrouter.com/en/main)\n\n## Install\n\n```npm\nnpm install scroll-to-top-react-router\n```\n\n## Import\n\n```js\nimport ScrollToTop from 'scroll-to-top-react-router'\n```\n\n## Usage\n\nUse inside the Router component, for example as below in App.js:\n\n```jsx\n\u003cRouter\u003e\n  \u003cScrollToTop /\u003e\n  \u003cRoutes\u003e\n    \u003cRoute path=\"/\" exact component={Home} /\u003e\n    \u003cRoute path=\"/about\" exact component={About} /\u003e\n  \u003c/Routes\u003e\n\u003c/Router\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllleeeaaannn%2Fscroll-to-top-react-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllleeeaaannn%2Fscroll-to-top-react-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllleeeaaannn%2Fscroll-to-top-react-router/lists"}