# Generating React Hooks from OpenAPI
Source: https://speakeasy.com/docs/sdks/customize/typescript/react-hooks

import { Callout, CodeWithTabs } from "@/mdx/components";



Speakeasy can optionally generate React Hooks as part of your TypeScript SDK. React Hooks are built from your OpenAPI document using TanStack Query (formerly React Query), making it easier to build web applications that interact with your API.

<Callout title="Availability" type="info">
  Generated React Query hooks are available as part of the Speakeasy [business
  tier](/pricing).
</Callout>

## How to generate React Hooks from an OpenAPI document

Follow these steps to generate React Hooks from your OpenAPI document:

### Install the Speakeasy CLI

If you haven't already, install the Speakeasy CLI:

<CodeWithTabs
  tabs={[
    {
      label: "Homebrew",
      language: "bash",
      code: `# Homebrew (macOS)
brew install speakeasy-api/tap/speakeasy`,
    },
    {
      label: "Script",
      language: "bash",
      code: `# Script Installation (macOS and Linux)
curl -fsSL https://go.speakeasy.com/cli-install.sh | sh`,
    },
    {
      label: "Winget",
      language: "bash",
      code: `# Windows Installation