Documentation Index
Fetch the complete documentation index at: https://kubo-47e69177.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
ZapAction is a typed contract layer for Next.js Server Actions and TanStack Query.What you get
- Runtime validation for input and output with Zod.
- Shared cache invalidation model between server and client.
- Query key and cache tag helpers for predictable data flows.
- React hooks that keep loading, success, and error states explicit.
Mental model
defineActionis the source of truth for action contracts.setActionContextinjects request context on the server.useActionQueryis for reads and enforcesreadPolicy: "read-only".useActionMutationis for writes and tag-based invalidation.
Suggested path
- Start with Project Setup.
- Continue with React Query.
- Validate behavior in Testing Patterns.
- Reuse the Full CRUD Example.