use-githubReact Hooks for the GitHub Rest API 😎
It returns an SWRHook, but if you don't know what that means, here's an example 👇
import { useGitHubUser } from "use-github";
export const UserCard = (username: string) => {
const { data: userData } = useGitHubUser(username);
return <>...</>;
};
# npm
npm install use-github
# yarn
yarn add use-github
# pnpm
pnpm add use-github
Currently this package only exposes useGitHubUser and useGitHubPinnedRepos, there are a lot more endpoints to cover!
Pull Request and Issues are more than welcome!
For examples you can check examples/ 📂
API Docs â–¶ https://use-github.js.org
Originally Done for my website 👇
Licensed under the MIT License.
Generated using TypeDoc