{"id":16923326,"url":"https://github.com/sanichkotikov/solid-use-script","last_synced_at":"2026-05-16T20:34:12.009Z","repository":{"id":57365900,"uuid":"417387247","full_name":"SanichKotikov/solid-use-script","owner":"SanichKotikov","description":"Solid hook to dynamically load an external script.","archived":false,"fork":false,"pushed_at":"2021-10-15T06:13:15.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T13:59:10.624Z","etag":null,"topics":["loader","npm-module","npm-package","solid-js","tiny-library"],"latest_commit_sha":null,"homepage":"","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/SanichKotikov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://money.yandex.ru/to/410013821917728/","https://www.paypal.me/cdrpro/"]}},"created_at":"2021-10-15T06:11:07.000Z","updated_at":"2022-03-30T14:53:54.000Z","dependencies_parsed_at":"2022-08-23T19:30:59.015Z","dependency_job_id":null,"html_url":"https://github.com/SanichKotikov/solid-use-script","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/SanichKotikov%2Fsolid-use-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanichKotikov%2Fsolid-use-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanichKotikov%2Fsolid-use-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanichKotikov%2Fsolid-use-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SanichKotikov","download_url":"https://codeload.github.com/SanichKotikov/solid-use-script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244711963,"owners_count":20497418,"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":["loader","npm-module","npm-package","solid-js","tiny-library"],"created_at":"2024-10-13T19:58:41.919Z","updated_at":"2026-05-16T20:34:11.953Z","avatar_url":"https://github.com/SanichKotikov.png","language":"TypeScript","funding_links":["https://money.yandex.ru/to/410013821917728/","https://www.paypal.me/cdrpro/"],"categories":[],"sub_categories":[],"readme":"# solid-use-script\n\nSolid hook to dynamically load an external script.\n\n```bash\nnpm i -S solid-use-script\n```\n\n## Usage\n\n```typescript jsx\nimport { Switch, Match } from 'solid-js';\nimport { useScript } from 'solid-use-script';\n\nfunction App() {\n  const [loading, error] = useScript('https://some.api');\n\n  return (\n    \u003cSwitch fallback={\u003cApiProvider\u003e...\u003c/ApiProvider\u003e}\u003e\n      \u003cMatch when={loading()}\u003eLoading API...\u003c/Match\u003e\n      \u003cMatch when={error()}\u003eFailed to load API: {error().message}\u003c/Match\u003e\n    \u003c/Switch\u003e\n  );\n}\n```\n\n### Attributes\n\n```typescript\nuseScript('https://some.api', { crossorigin: 'anonymous' });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanichkotikov%2Fsolid-use-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanichkotikov%2Fsolid-use-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanichkotikov%2Fsolid-use-script/lists"}