{"id":16117709,"url":"https://github.com/technikhil314/use-webworker","last_synced_at":"2025-04-06T09:26:10.297Z","repository":{"id":57388510,"uuid":"342229273","full_name":"technikhil314/use-webworker","owner":"technikhil314","description":"A react hook wrapper over comlink for using web workers","archived":false,"fork":false,"pushed_at":"2021-02-28T07:49:52.000Z","size":1061,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T05:28:08.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"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/technikhil314.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}},"created_at":"2021-02-25T11:56:49.000Z","updated_at":"2021-02-28T07:49:22.000Z","dependencies_parsed_at":"2022-09-19T02:10:42.261Z","dependency_job_id":null,"html_url":"https://github.com/technikhil314/use-webworker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technikhil314%2Fuse-webworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technikhil314%2Fuse-webworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technikhil314%2Fuse-webworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technikhil314%2Fuse-webworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technikhil314","download_url":"https://codeload.github.com/technikhil314/use-webworker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247460691,"owners_count":20942473,"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-10-09T20:46:31.141Z","updated_at":"2025-04-06T09:26:10.270Z","avatar_url":"https://github.com/technikhil314.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-webworker\n\n\u003e A react hook wrapper over webworker exposing message data from worker as state\n\n[//]: \u003c\u003e (start placeholder for auto-badger)\n\n\n[![Build Status](https://img.shields.io/github/workflow/status/technikhil314/use-webworker/publish?style=flat-square\u0026color=%23007a1f)](https://github.com/technikhil314/use-webworker/actions)\n[![version](https://img.shields.io/npm/v/use-webworker.svg?style=flat-square)](https://npmjs.org/use-webworker)\n[![min size](https://img.shields.io/bundlephobia/min/use-webworker)](https://bundlephobia.com/result?p=use-webworker)\n[![mingzip size](https://img.shields.io/bundlephobia/minzip/use-webworker)](https://bundlephobia.com/result?p=use-webworker)\n[![license](https://img.shields.io/npm/l/use-webworker?color=%23007a1f)](https://github.com/technikhil314/use-webworker/blob/master/LICENSE)\n\n[![dependancies](https://img.shields.io/librariesio/release/npm/use-webworker?color=%23007a1f)](https://libraries.io/npm/use-webworker)\n[![downloads](https://img.shields.io/npm/dm/use-webworker)](https://npmcharts.com/compare/use-webworker)\n[![all contributors](https://img.shields.io/github/all-contributors/technikhil314/use-webworker)](https://github.com/technikhil314/use-webworker/graphs/contributors)\n[![code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](https://github.com/technikhil314/use-webworker/blob/master/CODE_OF_CONDUCT.md)\n\n[![stargazers](https://img.shields.io/github/stars/technikhil314/use-webworker?style=social)](https://github.com/technikhil314/use-webworker/stargazers)\n[![number of forks](https://img.shields.io/github/forks/technikhil314/use-webworker?style=social)](https://github.com/technikhil314/use-webworker/fork)\n\n###### :clap: \u0026 :heart: to [auto badger](https://github.com/technikhil314/auto-badger) for making badging simple\n\n[//]: \u003c\u003e (end placeholder for auto-badger)\n\n\n\n\n## Install\n\n```bash\nnpm install --save use-webworker\n```\n\n## Usage\n\n```tsx\nimport useWebworker from 'use-webworker'\n\nfunction Example {\n  const {isProcessing, data: dataFromWorker } = useWebworker({\n    url: '/worker.js', // available at %PUBLIC_URL%/worker.js\n    data: {}\n  });\n  if(isProcessing) {\n    return \u003ch1\u003eLoading...\u003c/h1\u003e\n  }\n  return \u003ch1\u003e{dataFromWorker}\u003c/h1\u003e\n}\n```\n\n## License\n\nMIT © [technikhil314](https://github.com/technikhil314)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnikhil314%2Fuse-webworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnikhil314%2Fuse-webworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnikhil314%2Fuse-webworker/lists"}