{"id":21571552,"url":"https://github.com/zheeeng/use-style-link","last_synced_at":"2025-03-18T06:16:21.768Z","repository":{"id":57388429,"uuid":"371584636","full_name":"zheeeng/use-style-link","owner":"zheeeng","description":"A React hook for inserting the identical style link.","archived":false,"fork":false,"pushed_at":"2021-06-01T07:34:35.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-24T20:04:28.392Z","etag":null,"topics":["hooks","react-hooks","style","style-link","style-sheet","use-style-link"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/use-style-link","language":"TypeScript","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/zheeeng.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":"2021-05-28T04:59:42.000Z","updated_at":"2022-08-08T06:32:30.000Z","dependencies_parsed_at":"2022-09-11T20:00:57.366Z","dependency_job_id":null,"html_url":"https://github.com/zheeeng/use-style-link","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/zheeeng%2Fuse-style-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Fuse-style-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Fuse-style-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zheeeng%2Fuse-style-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zheeeng","download_url":"https://codeload.github.com/zheeeng/use-style-link/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166760,"owners_count":20409180,"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":["hooks","react-hooks","style","style-link","style-sheet","use-style-link"],"created_at":"2024-11-24T11:16:40.145Z","updated_at":"2025-03-18T06:16:21.740Z","avatar_url":"https://github.com/zheeeng.png","language":"TypeScript","readme":"# useStyleLink\n\n[![NPM](https://nodei.co/npm/use-style-link.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/use-style-link/)\n\n![publish workflow](https://github.com/zheeeng/use-style-link/actions/workflows/publish.yml/badge.svg)\n[![npm version](https://img.shields.io/npm/v/use-style-link.svg)](https://www.npmjs.com/package/use-style-link)\n\nA React hook for inserting the identical style link.\n\nSupport SSR scene.\n\n## Install\n\n```bash\nyarn add use-style-link (or by npm)\n```\n\n## Usage\n\n```ts\nimport { useStyleLink } from 'use-style-link'\n\nconst App = () =\u003e {\n    useStyleLink('https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css')\n\n    return (\n        \u003cdiv\u003eHello world\u003c/div\u003e\n    )\n}\n```\n\n## Signature\n\n```ts\nconst useStyleLink: (url: string, autoClear?: boolean, isSameLink?: (link1: string, link2: string) =\u003e boolean) =\u003e void\n```\n\nby default, it won't clear the inserted style link automatically for performance consideration.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzheeeng%2Fuse-style-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzheeeng%2Fuse-style-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzheeeng%2Fuse-style-link/lists"}