{"id":28737503,"url":"https://github.com/devxlalit/useapi-hook","last_synced_at":"2026-04-24T22:36:26.376Z","repository":{"id":239992112,"uuid":"801190341","full_name":"devXlalit/useApi-Hook","owner":"devXlalit","description":"A simple customizable react hook for handling API in React JS","archived":false,"fork":false,"pushed_at":"2024-05-15T19:44:33.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T02:39:41.797Z","etag":null,"topics":["api-rest","api-server","apigateway","hooks-api-react","javascript-es6","react","react-components","react-hooks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/devXlalit.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":"2024-05-15T19:07:35.000Z","updated_at":"2024-07-08T04:42:53.000Z","dependencies_parsed_at":"2024-05-16T07:10:00.228Z","dependency_job_id":"136a1433-88f5-4e8b-bc00-5c11073ecadd","html_url":"https://github.com/devXlalit/useApi-Hook","commit_stats":null,"previous_names":["devxlalit/useapi-hook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devXlalit/useApi-Hook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devXlalit%2FuseApi-Hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devXlalit%2FuseApi-Hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devXlalit%2FuseApi-Hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devXlalit%2FuseApi-Hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devXlalit","download_url":"https://codeload.github.com/devXlalit/useApi-Hook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devXlalit%2FuseApi-Hook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32243564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api-rest","api-server","apigateway","hooks-api-react","javascript-es6","react","react-components","react-hooks"],"created_at":"2025-06-16T02:31:02.377Z","updated_at":"2026-04-24T22:36:26.357Z","avatar_url":"https://github.com/devXlalit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# useApi Hook for React Js\n\nA simple customizable react hook for handling API in your react project.\n## 🛠 Skills\nJavascript , React JS , Node js\n\n## Features\n\n- Handle API Responce\n- Handle API Loading\n- Handle API error\n\n## Installation\n\nCreate vite + React or simple react app\n```bash\nnpx create-react-app project_name\n```\nOr\n```bash\nnpm create vite@latest\n```\n\n### Usage -\n\n## Screenshots\n\n![App Screenshot](https://raw.githubusercontent.com/devXlalit/useApi-Hook/main/hook%20folder.png)\n\nUse this on any component or App.jsx file if you want.\n\n```bash\n  const [loading, error, response] = useApi(\n    \"http://localhost:3000/api/products/name\"\n  );\n\n  if (error) {\n    return \u003ch1\u003eSomething went wrong!\u003c/h1\u003e;\n  }\n  if (loading) {\n    return \u003ch1\u003eLoading...\u003c/h1\u003e;\n  }\n```\n\nJust pass your api on the useApi hook and useApi hook will give your 3 response that are \n1. loading - it will check if api is ready or not\n2. error - it will throw an error if API dosen't respond \n3. response - it will show the result/response of API\n\n\nwe can also handle all the responses and can customize the useApi for our own usecase scenario.\n\n\n\n\n## Authors\n\n- [@lalit-pagare](https://github.com/lalit-pagare)\n- [@devXlalit](https://github.com/devXlalit)\n\n\n\n## Support\n\nFor support, Just Star ⭐ the Repo and enjoy learnig the most usefull customizable react hook😎😎\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxlalit%2Fuseapi-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxlalit%2Fuseapi-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxlalit%2Fuseapi-hook/lists"}