tanstack-appoperation-requests
Standardize how API requests are defined and consumed via AppOperation together with TanStack Query. Use in React Native/Expo projects when the user mentions appOperation, QUERY_KEYS, api.ts from this
SKILL.md.cursor/skills/tanstack-appoperation-requests/SKILL.md
GitHubTanStack Query + AppOperation Requests (Kit)
This skill is the portable version of the pattern:
- Central
AppOperationclass (src/AppOperation.ts). QUERY_KEYSobject (as const) +Requestsmap +requestsobject (src/api.ts).appOperation.getRequestas the only HTTP entry point.- TanStack Query hooks using
appOperationinqueryFn/mutationFn. - A single
showToast(type, message)handler passed toAppOperation(and optionally overridden viasetToastHandler) so all success/error toasts are handled in one place; individual calls can passsuppressToast: truewhen they must be silent.
Use this whenever editing projects that consume tanstack-appoperation-kit.
For full instructions and examples, see the main README.