{"id":52029923,"url":"https://github.com/nicklima/axios-hook-library","last_synced_at":"2026-08-01T12:01:28.777Z","repository":{"id":45666342,"uuid":"352622902","full_name":"nicklima/axios-hook-library","owner":"nicklima","description":"Custom React Hook ","archived":false,"fork":false,"pushed_at":"2026-05-19T01:15:04.000Z","size":6213,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-19T03:10:19.150Z","etag":null,"topics":["axios","axios-hook-library","component","hook","library","npm-package","react","typescript"],"latest_commit_sha":null,"homepage":"https://nicklima.github.io/axios-hook-library","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/nicklima.png","metadata":{"files":{"readme":".github/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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["nicklima"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-03-29T11:43:58.000Z","updated_at":"2026-05-19T01:15:01.000Z","dependencies_parsed_at":"2025-03-12T02:32:39.594Z","dependency_job_id":"c3139f91-7a23-41d4-b3d5-152289e2dbce","html_url":"https://github.com/nicklima/axios-hook-library","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.04166666666666663,"last_synced_commit":"0115f4a3810d86c06951a3ad1a7c26406cde3c09"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nicklima/axios-hook-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklima%2Faxios-hook-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklima%2Faxios-hook-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklima%2Faxios-hook-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklima%2Faxios-hook-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklima","download_url":"https://codeload.github.com/nicklima/axios-hook-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklima%2Faxios-hook-library/sbom","scorecard":{"id":685242,"data":{"date":"2025-08-11","repo":{"name":"github.com/nicklima/axios-hook-library","commit":"34012a92638b117d330af8e48999ad573fe46098"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 16 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"97 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-3wcq-x3mq-6r9p","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-33f9-j839-rf8h","Warn: Project is vulnerable to: GHSA-c36v-fmgq-m8hx","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc","Warn: Project is vulnerable to: GHSA-rqff-837h-mm52","Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2","Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j","Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T00:35:25.147Z","repository_id":45666342,"created_at":"2025-08-22T00:35:25.148Z","updated_at":"2025-08-22T00:35:25.148Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36155953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["axios","axios-hook-library","component","hook","library","npm-package","react","typescript"],"created_at":"2026-08-01T12:01:26.746Z","updated_at":"2026-08-01T12:01:28.745Z","avatar_url":"https://github.com/nicklima.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nicklima"],"categories":[],"sub_categories":[],"readme":"# Axios Hook Library\n\n[![NPM](https://img.shields.io/npm/v/axios-hook-library.svg)](https://www.npmjs.com/package/axios-hook-library)\n\n[![GH-Pages](https://img.shields.io/github/deployments/nicklima/axios-hook-library/github-pages)](https://nicklima.github.io/axios-hook-library/)\n[![GitHub License](https://img.shields.io/github/license/nicklima/axios-hook-library)](https://github.com/nicklima/axios-hook-library/)\n[![GitHub Issues](https://img.shields.io/github/issues/nicklima/axios-hook-library)](https://github.com/nicklima/axios-hook-library/issues)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-blue.svg)](https://standardjs.com)\n[![Code Size](https://img.shields.io/github/languages/code-size/nicklima/axios-hook-library)](https://github.com/nicklima/axios-hook-library)\n[![Top Language](https://img.shields.io/github/languages/top/nicklima/axios-hook-library)](https://standardjs.com)\n[![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat)](https://gitmoji.dev)\n\n## Table of contents\n\n- [About](#about)\n- [Playground](#playground)\n- [Technologies](#technologies)\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [Usage \u0026 Examples](#usage--examples)\n  - [POST](#POST)\n  - [GET](#GET)\n  - [PATCH/PUT](#PATCH/PUT)\n  - [DELETE](#DELETE)\n- [TODO](#todo)\n- [License](#license)\n\n## About\n\nThis project was developed to help our team to minimize the code in our projects.\n\n## Playground\n\n[Click here](https://nicklima.github.io/axios-hook-library/) to view the project demo and made some tests requests.\n\n## Technologies\n\n- [React](https://pt-br.reactjs.org/)\n- [TypeScript](https://www.typescriptlang.org)\n\n## Dependencies\n\n- [Node](https://nodejs.org/en/download/)\n- [Create React Lib](https://www.npmjs.com/package/create-react-library)\n- [MicroBundle CRL](https://www.npmjs.com/package/microbundle-crl)\n- [Axios](https://www.npmjs.com/package/axios)\n- [Pretier](https://prettier.io/)\n- [Eslint](https://eslint.org/)\n- [Jest](https://jestjs.io/pt-BR/)\n- [CrossEnv](https://www.npmjs.com/package/cross-env)\n\n## Installation\n\nTo run the code on your machine, follow the steps below.\n\n```bash\ngit clone git@github.com:nicklima/axios-hook-library.git\n```\n\nAfter cloning the project, we need to install all the dependencies.\n\n```bash\n# npm\nnpm install\n\n# yarn\nyarn install\n```\n\nLocal development is broken into two parts (ideally using two tabs).\nFirst, run rollup to watch your src/ module and automatically recompile it into dist/ whenever you make changes.\n\n```bash\n# runs rollup with watch flag\n# npm\nnpm start\n\n# yarn\nyarn start\n```\n\nThe second part will be running the example/ create-react-app that's linked to the local version of your module.\n\nWe have to prepare the test environment to view the package that is being executed. Open another terminal window and run the following commands:\n\n```bash\n# (in another tab)\n# this command will chage to example directory and install modules\n\n#npm\nnpm run example\n\n#yarn\nyarn run example\n```\n\nAnd finally we can run the project and test.\n\n```bash\n# (on the same tab as the previous command)\n# runs create-react-app dev server\n\n#npm\nnpm run preview\n\n#yarn\nyarn run preview\n```\n\nNow, anytime you make a change to your library in src/ or to the example app's example/src, create-react-app will live-reload your local dev server so you can iterate on your component in real-time.\n\n## Usage \u0026 Examples\n\nHere are some examples of how to use Axios Hook Library.\nFirst we will need to install the package\n\n```bash\n# npm\nnpm install axios-hook-library\n\n# yarn\nyarn add axios-hook-library\n```\n\n### Usage\n\nOnce installed just import it into your JSX file as in the example below\n\n```tsx\nimport React from 'react'\nimport useAxiosHook from 'axios-hook-library'\n\nimport logo from './logo.svg'\nimport './App.css'\n\nconst App = () =\u003e {\n  const { isLoading, isSuccess, hasError, rspData, fetchData } = useAxiosHook()\n\n  return (\n    \u003cmain\u003e\n      \u003cdiv className='App'\u003e\n        \u003cheader className='App-header'\u003e\n          \u003cimg src={logo} className='App-logo' alt='logo' /\u003e\n        \u003c/header\u003e\n      \u003c/div\u003e\n    \u003c/main\u003e\n  )\n}\n\nexport default App\n```\n\nIn the code below we have some useful information on how to use the library\n\n```tsx\n//If you want to reset the isSuccess state, pass a time parameter on the hook call.\n//Ex: useAxiosHook(3000)\nconst { isLoading, isSuccess, hasError, rspData, fetchData } = useAxiosHook()\n\n//Function fetchData\n//Params: baseURL, method (\"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\"), data\nfetchData('https://jsonplaceholder.typicode.com/posts', 'GET')\n\n//React States\n//isLoading(boolean), isSuccess(boolean), hasError(boolean), rspData(object)\nisLoading \u0026\u0026 \u003cp\u003eLoading\u003c/p\u003e\nisSuccess \u0026\u0026 \u003cp\u003eSent\u003c/p\u003e\nhasError \u0026\u0026 \u003cp\u003eError\u003c/p\u003e\nrspData \u0026\u0026 \u003cpre\u003e{JSON.stringify(rspData, null, 2)}\u003c/pre\u003e\n```\n\n### Examples\n\nCheck below how to make requests with the Axios Hook Library\n\n#### POST\n\n```tsx\nimport React from 'react'\nimport useAxiosHook from 'axios-hook-library'\n\nimport logo from './logo.svg'\nimport './App.css'\n\nconst App = () =\u003e {\n  const { isLoading, isSuccess, hasError, fetchData } = useAxiosHook()\n\n  const formData = {\n    title: 'Axios Hook Library',\n    body: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.',\n    userId: 1,\n  }\n\n  return (\n    \u003cmain\u003e\n      \u003cdiv className='App'\u003e\n        \u003cheader className='App-header'\u003e\n          \u003cimg src={logo} className='App-logo' alt='logo' /\u003e\n          \u003cbutton\n            onClick={() =\u003e\n              fetchData(\n                'https://jsonplaceholder.typicode.com/posts',\n                'POST',\n                formData\n              )\n            }\n          \u003e\n            Send Request\n          \u003c/button\u003e\n        \u003c/header\u003e\n        {isLoading \u0026\u0026 \u003cp\u003eSending Data...\u003c/p\u003e}\n        {hasError \u0026\u0026 \u003cp\u003eSome error occurred, try again.\u003c/p\u003e}\n        {isSuccess \u0026\u0026 \u003cp\u003eData Sent!\u003c/p\u003e}\n      \u003c/div\u003e\n    \u003c/main\u003e\n  )\n}\n\nexport default App\n```\n\n#### GET\n\n```tsx\nimport React from 'react'\nimport useAxiosHook from 'axios-hook-library'\n\nimport logo from './logo.svg'\nimport './App.css'\n\nconst App = () =\u003e {\n  const { isLoading, hasError, rspData, fetchData } = useAxiosHook()\n\n  //Function to check if the object is empty\n  const checkData = () =\u003e {\n    if (Object.keys(rspData).length !== 0) {\n      return true\n    }\n    return false\n  }\n\n  return (\n    \u003cmain\u003e\n      \u003cdiv className='App'\u003e\n        \u003cheader className='App-header'\u003e\n          \u003cimg src={logo} className='App-logo' alt='logo' /\u003e\n          \u003cbutton\n            onClick={() =\u003e\n              fetchData(\n                'https://jsonplaceholder.typicode.com/posts/1/comments',\n                'GET'\n              )\n            }\n          \u003e\n            Get Posts\n          \u003c/button\u003e\n        \u003c/header\u003e\n        \u003cdiv className='comments'\u003e\n          {isLoading \u0026\u0026 \u003cp\u003eLoading Content...\u003c/p\u003e}\n          {hasError \u0026\u0026 \u003cp\u003eSome error occurred, try again.\u003c/p\u003e}\n          {checkData() \u0026\u0026\n            rspData.data.map((comment: any) =\u003e {\n              return (\n                \u003cdiv key={comment.id}\u003e\n                  \u003ch1\u003e{comment.title}\u003c/h1\u003e\n                  \u003cp\u003e{comment.body}\u003c/p\u003e\n                \u003c/div\u003e\n              )\n            })}\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/main\u003e\n  )\n}\n\nexport default App\n```\n\n#### PATCH/PUT\n\n```tsx\nimport React from 'react'\nimport useAxiosHook from 'axios-hook-library'\n\nimport logo from './logo.svg'\nimport './App.css'\n\nconst App = () =\u003e {\n  const { isLoading, isSuccess, hasError, fetchData } = useAxiosHook()\n\n  const formData = {\n    title: 'Axios Hook Library',\n    userId: 1,\n  }\n\n  return (\n    \u003cmain\u003e\n      \u003cdiv className='App'\u003e\n        \u003cheader className='App-header'\u003e\n          \u003cimg src={logo} className='App-logo' alt='logo' /\u003e\n          \u003cbutton\n            onClick={() =\u003e\n              fetchData(\n                'https://jsonplaceholder.typicode.com/posts/1',\n                'PATCH',\n                formData\n              )\n            }\n          \u003e\n            Send Request\n          \u003c/button\u003e\n        \u003c/header\u003e\n        {isLoading \u0026\u0026 \u003cp\u003eSending Data...\u003c/p\u003e}\n        {hasError \u0026\u0026 \u003cp\u003eSome error occurred, try again.\u003c/p\u003e}\n        {isSuccess \u0026\u0026 \u003cp\u003ePost Updated!\u003c/p\u003e}\n      \u003c/div\u003e\n    \u003c/main\u003e\n  )\n}\n\nexport default App\n```\n\n#### DELETE\n\n```tsx\nimport React from 'react'\nimport useAxiosHook from 'axios-hook-library'\n\nimport logo from './logo.svg'\nimport './App.css'\n\nconst App = () =\u003e {\n  const { isLoading, isSuccess, hasError, fetchData } = useAxiosHook()\n\n  return (\n    \u003cmain\u003e\n      \u003cdiv className='App'\u003e\n        \u003cheader className='App-header'\u003e\n          \u003cimg src={logo} className='App-logo' alt='logo' /\u003e\n          \u003cbutton\n            onClick={() =\u003e\n              fetchData(\n                'https://jsonplaceholder.typicode.com/posts/1',\n                'DELETE'\n              )\n            }\n          \u003e\n            Delete Post\n          \u003c/button\u003e\n        \u003c/header\u003e\n        {isLoading \u0026\u0026 \u003cp\u003eTrying to delete...\u003c/p\u003e}\n        {hasError \u0026\u0026 \u003cp\u003eSome error occurred, try again.\u003c/p\u003e}\n        {isSuccess \u0026\u0026 \u003cp\u003eDeleted with success!\u003c/p\u003e}\n      \u003c/div\u003e\n    \u003c/main\u003e\n  )\n}\n\nexport default App\n```\n\n## TODO\n\nHere are some features that i want to add in the package. If you want to help, send me a PR\n\n- [ ] Create a DOC page;\n- [ ] Create Unitary tests to the React Hook function;\n- [ ] Add Husky to the project\n- [ ] Check and fix all types;\n- [ ] Add Headers param in fetchData function;\n- [ ] Add Headers Fields to Input headers options on Playground/Preview URL;\n- [ ] Check the code and dependencies looking for Security Issues;\n\n## License\n\nMIT © [Nick Lima](https://github.com/nicklima)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklima%2Faxios-hook-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklima%2Faxios-hook-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklima%2Faxios-hook-library/lists"}