{"id":14957202,"url":"https://github.com/munafio/react-github-user-stats","last_synced_at":"2025-07-30T13:13:50.647Z","repository":{"id":37313823,"uuid":"505611653","full_name":"munafio/react-github-user-stats","owner":"munafio","description":"Get Github user's stats using React Hooks.","archived":false,"fork":false,"pushed_at":"2022-12-22T09:33:19.000Z","size":2064,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T00:07:49.053Z","etag":null,"topics":["github-api","github-stats","react","react-hooks","react-js"],"latest_commit_sha":null,"homepage":"https://munafio.github.io/react-github-user-stats/","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/munafio.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":"2022-06-20T22:07:02.000Z","updated_at":"2024-12-29T18:48:43.000Z","dependencies_parsed_at":"2023-01-30T06:46:47.678Z","dependency_job_id":null,"html_url":"https://github.com/munafio/react-github-user-stats","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/munafio%2Freact-github-user-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munafio%2Freact-github-user-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munafio%2Freact-github-user-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munafio%2Freact-github-user-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munafio","download_url":"https://codeload.github.com/munafio/react-github-user-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252008691,"owners_count":21679624,"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":["github-api","github-stats","react","react-hooks","react-js"],"created_at":"2024-09-24T13:14:19.829Z","updated_at":"2025-05-02T08:30:36.723Z","avatar_url":"https://github.com/munafio.png","language":"TypeScript","readme":"# react-github-user-stats\n\n\u003e\n\n[![NPM](https://img.shields.io/npm/v/react-github-user-stats.svg)](https://www.npmjs.com/package/react-github-user-stats) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\u003ccenter\u003e\n\u003cimg src=\"/assets/demo-image.png\"\u003e\n\u003c/center\u003e\n\nThis simple npm package provides you an easy way to get Github user's stats using React Hooks.\n\n## Demo\n\n[Click here](https://munafio.github.io/react-github-user-stats/)\n\n## Install\n\n```bash\nnpm install --save react-github-user-stats\n```\n\n## Usage\n\n```tsx\nimport * as React from \"react\";\nimport useGithubStats from \"react-github-user-stats\";\n\nconst Example = () =\u003e {\n  const { error, loading, userData } = useGithubStats(\"munafio\");\n\n  if (loading) return \u003ch1\u003eLoading data..\u003c/h1\u003e;\n  if (error) return \u003ch1\u003eERROR: {error}\u003c/h1\u003e;\n  if (!userData) return \u003ch1\u003eNot found!\u003c/h1\u003e;\n\n  return (\n    \u003cdiv\u003e\n      \u003cpre\u003e{JSON.stringify(userData, null, 2)}\u003c/pre\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\nDo not forget to replace `munafio` with the username you want.\n\n## Sample\n\nThe `userData` returned from this hook contains props as the below sample shows:\n\n```json\n{\n  \"data\": {\n    \"id\": 20261627,\n    \"name\": \"Munaf Aqeel Mahdi\",\n    \"username\": \"munafio\",\n    \"avatar_url\": \"https://avatars.githubusercontent.com/u/20261627?v=4\",\n    \"url\": \"https://github.com/munafio\",\n    \"type\": \"User\",\n    \"company\": \"Full-Stack Web Developer\",\n    \"website\": \"munafio.com\",\n    \"location\": \"Babil ⇄ Iraq\",\n    \"email\": null,\n    \"bio\": null,\n    \"twitter_username\": \"munafiofficial\",\n    \"public_repos\": 19,\n    \"public_gists\": 1,\n    \"followers\": 242,\n    \"following\": 5,\n    \"total_stars\": 1775,\n    \"total_forks\": 462,\n    \"created_at\": \"2016-07-03T01:06:30Z\",\n    \"updated_at\": \"2022-06-12T12:11:17Z\"\n  }\n}\n```\n\n## License\n\nMIT © [munafio](https://github.com/munafio)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunafio%2Freact-github-user-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunafio%2Freact-github-user-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunafio%2Freact-github-user-stats/lists"}