← ClaudeAtlas

spoosh-reactlisted

Use this skill when the user asks about "Spoosh", "useRead", "useWrite", "usePages", "useQueue", "useSSE", "createClient", "Spoosh React", "Spoosh hooks", "Spoosh plugins", "cache plugin", "retry plugin", "polling plugin", "optimistic updates", "standalone optimistic", "WebSocket cache update", "invalidation", "devtool", "Spoosh DevTools", "Next.js SSR", "initialData", "HonoToSpoosh", "ElysiaToSpoosh", "OpenAPI", "data fetching component", "mutation component", "infinite scroll", "Spoosh patterns", or needs to build React components with type-safe API calls. Provides comprehensive API knowledge and component patterns for @spoosh/react.
spooshdev/skills · ★ 0 · Web & Frontend · score 65
Install: claude install-skill spooshdev/skills
# Spoosh React Spoosh is a type-safe API toolkit with a composable plugin architecture for TypeScript. This skill covers the React integration including hooks API, plugins, and component patterns. ## Setup ```bash pnpm add @spoosh/core @spoosh/react ``` ```typescript import { Spoosh } from "@spoosh/core"; import { create } from "@spoosh/react"; type ApiSchema = { users: { GET: { data: User[] }; POST: { data: User; body: CreateUserBody }; }; "users/:id": { GET: { data: User }; DELETE: { data: void }; }; }; const spoosh = new Spoosh<ApiSchema, Error>("/api").use([ cachePlugin(), retryPlugin(), ]); export const { useRead, useWrite, usePages, useQueue, useSSE } = create(spoosh); ``` ## createClient (Lightweight) For simple use cases without hooks or plugins: ```typescript import { createClient } from "@spoosh/core"; const api = createClient<ApiSchema, Error>("/api"); const { data, error } = await api("users").GET(); const { data: user } = await api("users/:id").GET({ params: { id: "123" } }); await api("users").POST({ body: { name: "John" } }); ``` ## Hooks API ### useRead Fetch data with automatic caching and state management. ```typescript const { data, loading, error, trigger } = useRead((api) => api("users").GET(), { staleTime: 30000, enabled: true, }); ``` **Returns:** `data`, `loading`, `fetching`, `error`, `trigger()`, `abort()`, `meta` **Options:** `enabled`, `tags`, `staleTime`, `retry`, `pollingInterval`, `refetch`, `deb