rtk-query-api

Official

Master RTK Query API patterns for reliable data.

AuthorLedger-Wallet-LLC
Version1.0.0
Installs0

System Documentation

What problem does it solve?

RTK Query API best practices for designing robust data-fetching slices with RTK Query. This skill guides developers to structure one API slice per base URL, define endpoints with build.query/build.mutation, and export generated hooks, ensuring consistent data management across apps.

Core Features & Use Cases

  • One API slice per base URL / data source
  • Define API slices in state-manager/api.ts
  • Export generated hooks alongside the API
  • Use build.query for GET requests
  • Use build.mutation for POST/PUT/DELETE
  • Type both response and argument: build.query<ResponseType, ArgType>
  • Use transformResponse to reshape API data
  • Use transformErrorResponse for custom error handling
  • Register APIs in reducers/rtkQueryApi.ts

Quick Start

Create an API slice with createApi for your base URL, define GET and mutation endpoints, and export the generated hooks.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: rtk-query-api
Download link: https://github.com/Ledger-Wallet-LLC/ledgerwallet/archive/main.zip#rtk-query-api

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.