> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/moss-docs/react-sdk/installation.md).

# Installation

The React wrapper is `@megaeth-labs/wallet-sdk-react`. It depends on the core SDK and TanStack Query. Use it for React 19+ products; for React apps already using wagmi, use the [Wagmi Connector](/moss-docs/react-sdk/wagmi-connector.md) instead.

```bash
# pick your package manager
npm install @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
pnpm add @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
yarn add @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
```

## Peer Requirements

* `react@^19`
* `@tanstack/react-query@^5`

The React wrapper depends on:

* `@megaeth-labs/wallet-sdk` — core wallet methods and types.
* `@tanstack/react-query` — query/mutation lifecycle used by hooks.

## Published Packages

* [`@megaeth-labs/wallet-sdk-react`](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk-react)
* [`@megaeth-labs/wallet-sdk`](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk)

## Already Managing a React Query Client?

If your app already instantiates a shared `QueryClient`, review the [Provider Setup](/moss-docs/react-sdk/provider-setup.md) page before integrating — the React SDK instantiates its own `QueryClient` internally.


---

# 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:

```
GET https://docs.megaeth.com/moss-docs/react-sdk/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
