{"id":21198225,"url":"https://github.com/xiaoping6688/react-quicklink-component","last_synced_at":"2025-03-14T22:12:49.330Z","repository":{"id":143985109,"uuid":"167401037","full_name":"xiaoping6688/react-quicklink-component","owner":"xiaoping6688","description":"quicklink with react component","archived":false,"fork":false,"pushed_at":"2018-12-29T10:22:00.000Z","size":8062,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T14:45:29.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/xiaoping6688.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-24T16:38:56.000Z","updated_at":"2021-08-05T08:09:52.000Z","dependencies_parsed_at":"2024-07-09T13:06:35.348Z","dependency_job_id":null,"html_url":"https://github.com/xiaoping6688/react-quicklink-component","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/xiaoping6688%2Freact-quicklink-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Freact-quicklink-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Freact-quicklink-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Freact-quicklink-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoping6688","download_url":"https://codeload.github.com/xiaoping6688/react-quicklink-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243652707,"owners_count":20325611,"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":[],"created_at":"2024-11-20T19:49:20.885Z","updated_at":"2025-03-14T22:12:49.324Z","avatar_url":"https://github.com/xiaoping6688.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-quicklink-component \n\u003e React component prefetching in-viewport links during idle time\n\nInspired by GoogleChromeLabs [quicklink](https://github.com/GoogleChromeLabs/quicklink/blob/master/README.md), implemented with React component\n\n## How it works\n\n`\u003cQuicklink\u003e` component attempts to make navigations to subsequent pages load faster. It:\n\n* **Detects links within the viewport** (using [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API))\n* **Waits until the browser is idle** (using [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback))\n* **Checks if the user isn't on a slow connection** (using `navigator.connection.effectiveType`) or has data-saver enabled (using `navigator.connection.saveData`)\n* **Prefetches URLs to the links** (using [`\u003clink rel=prefetch\u003e`](https://www.w3.org/TR/resource-hints/#prefetch) or XHR). Provides some control over the request priority (can switch to `fetch()` if supported).\n\nwe connect [quicklink](https://github.com/GoogleChromeLabs/quicklink/blob/master/README.md) source code by `React ref` and design `\u003cQuicklink\u003e` component by `render prop` pattern.\n\n## Installation\n\nFor use with [node](http://nodejs.org) and [npm](https://npmjs.com):\n\n```sh\nnpm install --save react-quicklink-component\n```\n\n## Usage\n\nOnce initialized, `Quicklink` will automatically prefetch children component's URLs for links that are in-viewport during idle time.\n\nQuickstart:\n\n``` javascript\n\u003cQuicklink quicklink={options}\u003e\n  \u003cComp1 /\u003e\n  ...\n  \u003cCompN /\u003e\n\u003c/Quicklink\u003e\n```\n\nAs for Quicklink's options prop, absolutely the same with [quicklink](https://github.com/GoogleChromeLabs/quicklink/blob/master/README.md)\n\n## License\n\nLicensed under the Apache-2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoping6688%2Freact-quicklink-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoping6688%2Freact-quicklink-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoping6688%2Freact-quicklink-component/lists"}