> For the complete documentation index, see [llms.txt](https://docs.yo.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yo.xyz/integrations/integration-guides/sdk/react/hooks/readme.md).

# README

`@yo-protocol/react` provides two categories of hooks:

**Read hooks** — backed by TanStack Query with automatic caching, refetching, and stale-while-revalidate:

* [useVault](broken://pages/9109e754e9fdc319af8bab6c9a35faa38a7cb4e6) — Single vault state + snapshot
* [useVaults](broken://pages/9c0627ef7f225a1cab0fd5fafc12a234c1ff8e22) — All vaults for the current chain
* [useUserBalance](broken://pages/62a2d76d1e9b8fc7c8dec24d33154aa1ac3f35a2) — Connected user's vault position
* [useVaultHistory](broken://pages/870d3d2fa9d398f5bc7d676f982d0fe873e10608) — APY and TVL timeseries data

**Action hooks** — mutation-style hooks with loading, error, and transaction confirmation tracking:

* [useDeposit](broken://pages/09392f3ad639911e45efd9b00a2cb7ac84d5e56a) — Deposit assets via gateway
* [useRedeem](broken://pages/f84f3b0d8a9be45a60a07f55ee55cefe8a2811f0) — Redeem shares for assets via gateway
* [useApprove](broken://pages/4603efa0d6ec049f211a87ef47ad36e5fb912db9) — Approve token spending

**Query hooks:**

* [usePendingRedemptions](broken://pages/0ddc9f7ef24f66b2c8e7cb1da87283409ded4ee2) — Pending async redemptions for a user


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yo.xyz/integrations/integration-guides/sdk/react/hooks/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
