0.1.2 • Published 4 years ago
use-github v0.1.2
use-github
View Demo
React 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 <>...</>;
};Installation ∙ 
# npm
npm install use-github
# yarn
yarn add use-github
# pnpm
pnpm add use-githubTODO
Currently this package only exposes useGitHubUser and useGitHubPinnedRepos, there are a lot more endpoints to cover!
Pull Request and Issues are more than welcome!
Docs
For examples you can check
examples/📂API Docs ▶ https://use-github.js.org
Notes
Originally Done for my website 👇
License
Licensed under the MIT License.