> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syncd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hooks

> Syncd hooks allow you to never have to interact directly with a third party REST API's again.

This is proudly open source. Check it out [here](https://syncd.dev/syncd-hooks)

Choose your preferred package manager to install the SDK:

```bash theme={null}
pnpm add syncd-hooks
```

```bash theme={null}
npm install syncd-hooks
```

```bash theme={null}
yarn add syncd-hooks
```

## How it works?

Each provider has a series of `quirks` that make it difficult to maintain and interact with. We've abstracted all of that away so you can focus on building your product.

### For example

Let's say you are creating `GitHub` webhook, to interact with the GitHub REST API you need to provider your user a dropdown list of all the organizations they are a part of. Usually you would have to make a request to the GitHub API to get this information, which means looking up the docs (which are HUGE, and different providers have different standards for docs). With Syncd, we've abstracted all of that away so you can just do this:

```typescript theme={null}
import { useGetGitHubOrganizations } from 'syncd-hooks';
...
const {data, isLoading, error} = useGetGitHubOrganizations({
    // You can either use a third party service to get this access token like `Nango`
    // Or you can use us - we manage the access tokens for your users so you don't have to
    accessToken: 'your-access-token'
});
...
// dropdown list of organizations
<select>
  {data.map((org) => (
    <option key={org.id} value={org.login}>{org.login}</option>
  ))}
</select>
```
