React Fetch Cache Patterns
pproenca/dot-skills
React data-fetching patterns at scale — recommender carousels, infinite feeds, pages with many parallel fetches, dashboards.
Use @data-client/react hooks for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, DataProvider, AsyncBoundary…
$ npx skills add reactive/data-client --skill data-client-react -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install reactive/data-client data-client-react --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/data-client-react .claude/skills/data-client-react && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .claude/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-reactType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add reactive/data-client --skill data-client-react -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install reactive/data-client data-client-react --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/data-client-react .agents/skills/data-client-react && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .agents/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add reactive/data-client --skill data-client-react -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install reactive/data-client data-client-react --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/data-client-react .cursor/skills/data-client-react && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .cursor/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/reactive/data-client.git --path .agents/skills/data-client-react--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add reactive/data-client --skill data-client-react -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install reactive/data-client data-client-react --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/data-client-react .gemini/skills/data-client-react && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .gemini/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install reactive/data-client data-client-reactInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add reactive/data-client --skill data-client-react -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/data-client-react .github/skills/data-client-react && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .github/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add reactive/data-client --skill data-client-react -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install reactive/data-client data-client-react --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactive/data-client.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/data-client-react .opencode/skills/data-client-react && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "data-client-react" agent skill from https://github.com/reactive/data-client/tree/master/.agents/skills/data-client-react into .opencode/skills/data-client-react/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-client-react", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
data-client-reactUse @data-client/react hooks for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, DataProvider, AsyncBoundary…
Data Client React is an agent skill from reactive/data-client. Use @data-client/react hooks for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, DataProvider, AsyncBoundary, useLoading, useDebounce. Use when reading/rendering remote data, triggering mutations, doing optimistic updates, real-time subscriptions, or wiring Suspense/error boundaries in React.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 26 other files, including reference files (for example `evals/evals.json`, `references.json` and `references/Actions.md`).
It sits in Development, covering React components and Error handling. It works with React. The repository describes itself as: Async State Management without the Management. REST, GraphQL, SSE, Websockets. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 02c0932. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
jsonplaceholder.typicode.comAlso links to:
dataclient.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Data Client React loads about 1.9k tokens when it runs, and up to ~40k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 371 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from reactive/data-client at commit 02c0932, republished under its Apache-2.0 licence (© reactive). 371 words, ~1,889 tokens.
.claude/skills/data-client-react/SKILL.md (or your agent's skills folder). This skill also uses 24 other files; get the full folder from GitHub.// GET https://jsonplaceholder.typicode.com/todos/5
const todo = useSuspense(TodoResource.get, { id: 5 });
// GET https://jsonplaceholder.typicode.com/todos
const todoList = useSuspense(TodoResource.getList);
// GET https://jsonplaceholder.typicode.com/todos?userId=1
const todoListByUser = useSuspense(TodoResource.getList, { userId: 1 });
// subscriptions with polling, websockets or SSE
const todo = useLive(TodoResource.get, { id: 5 });
// without fetch
const todo = useCache(TodoResource.get, { id: 5 });
const todo = useQuery(Todo, { id: 5 });
// fetch without Suspense - returns { data, loading, error }
const { data, loading, error } = useDLE(TodoResource.get, { id: 5 });
// subscribe without Suspense (use with useSuspense or useDLE)
useSubscription(TodoResource.get, { id: 5 });
// parallel fetches with React.use()
const postPromise = useFetch(PostResource.get, { id });
const commentsPromise = useFetch(CommentResource.getList, { postId: id });
const post = use(postPromise);
const comments = use(commentsPromise);For API definitions (like TodoResource), apply the skill "data-client-rest".
const ctrl = useController();
// PUT https://jsonplaceholder.typicode.com/todos/5
const updateTodo = todo => ctrl.fetch(TodoResource.update, { id }, todo);
// PATCH https://jsonplaceholder.typicode.com/todos/5
const partialUpdateTodo = todo =>
ctrl.fetch(TodoResource.partialUpdate, { id }, todo);
// POST https://jsonplaceholder.typicode.com/todos
const addTodoToBeginning = todo =>
ctrl.fetch(TodoResource.getList.unshift, todo);
// POST https://jsonplaceholder.typicode.com/todos?userId=1
const addTodoToEnd = todo => ctrl.fetch(TodoResource.getList.push, { userId: 1 }, todo);
// DELETE https://jsonplaceholder.typicode.com/todos/5
const deleteTodo = id => ctrl.fetch(TodoResource.delete, { id });
// GET https://jsonplaceholder.typicode.com/todos?userId=1&page=2
const getNextPage = (page) => ctrl.fetch(TodoResource.getList.getPage, { userId: 1, page })const [handleSubmit, loading, error] = useLoading(
async data => {
const post = await ctrl.fetch(PostResource.getList.push, data);
navigateToPost(post.id);
},
[ctrl],
);const [query, setQuery] = React.useState('');
const handleChange = e => setQuery(e.currentTarget.value);
const [debouncedQuery, isPending] = useDebounce(query, 200);
return (
<AsyncBoundary fallback={<Loading />}>
<IssueList query={debouncedQuery} owner="facebook" repo="react" />
</AsyncBoundary>
)Prefer using AsyncBoundary for error handling and loading states unless the codebase has
a custom AsyncBoundary that already combines Suspense and ErrorBoundary.
Its props are fallback, errorComponent, errorClassName, and listen. It can be used to wrap any component that fetches data.
<AsyncBoundary listen={history.listen}>
<TodoList />
</AsyncBoundary>Controller is returned from useController(). It has:
ctrl.fetch(), ctrl.fetchIfStale(), ctrl.expireAll(), ctrl.invalidate(), ctrl.invalidateAll(), ctrl.setResponse(), ctrl.set(),
ctrl.setError(), ctrl.resetEntireStore(), ctrl.subscribe(), ctrl.unsubscribe().
Write many entities without a fetch with one ctrl.set([Entity], rows). Never loop ctrl.set(Entity, args, row) per row, and never add an endpoint or setResponse() just to batch.
const queryRemainingTodos = new Query(
TodoResource.getList.schema,
entries => entries.filter(todo => !todo.completed).length,
);
const allRemainingTodos = useQuery(queryRemainingTodos);
const firstUserRemainingTodos = useQuery(queryRemainingTodos, { userId: 1 });const groupTodoByUser = new Query(
TodoResource.getList.schema,
todos => Object.groupBy(todos, todo => todo.userId),
);
const todosByUser = useQuery(groupTodoByUser);To inspect store state, track dispatched actions, or invoke
Controller methods from a browser MCP (user-chrome-devtools),
see devtools-debugging. Uses globalThis.__DC_CONTROLLERS__
available in dev mode.
Custom Managers allow for global side effect handling. This is useful for websockets, SSE, logging, etc. Always use the skill "data-client-manager" when writing managers.
Query schema (with the data model, e.g. src/resources/) so they stay reusable and evolve independently of viewsFor detailed API documentation, see the references directory:
ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via skill "data-client-schema" definitions.
© reactive, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 24 other files (references) in .agents/skills/data-client-react of reactive/data-client.
Open the folder on GitHubat commit 02c0932
Data Client React next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Data Client React this skillreactive/data-client | 2k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| React Fetch Cache Patternspproenca/dot-skills | 214 | — | ~3k | Automated safety check: Pass | MIT | |
| Typescript Rulesshinpr/claude-code-workflows | 690 | — | ~1.8k | Automated safety check: Pass | MIT | |
| React UI State PatternsChrisWiles/claude-code-showcase | 6.1k | 7 repos | ~1.6k | Automated safety check: Pass | None | |
| @pierre/diffs Code Renderingpierrecomputer/pierre | 6.2k | 2 repos | ~803 | Automated safety check: Pass | Apache-2.0 | |
| OpenTUI Terminal Interfacescline/cline | 70k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 |
pproenca/dot-skills
React data-fetching patterns at scale — recommender carousels, infinite feeds, pages with many parallel fetches, dashboards.
shinpr/claude-code-workflows
React/TypeScript frontend development rules including type safety, component design, state management, and error handling.
ChrisWiles/claude-code-showcase
Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.
pierrecomputer/pierre
Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.
cline/cline
Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing.
jasonjgardner/blockbench-mcp-plugin
Zod schema validation best practices for type safety, parsing, and error handling.
reactive/data-client
Set up and migrate to @data-client/rest for REST APIs. An agent skill from reactive/data-client.
reactive/data-client
Implement @data-client Managers for global/background side effects - websocket, SSE, polling, real-time updates, subscriptions, logging, analytics, metrics/timing, error reporting (Sentry), toast…
reactive/data-client
Test @data-client/react with renderDataHook and mountDataClient - jest unit tests, fixtures, interceptors, MockResolver, mock responses, nock HTTP mocking, fake timers for polling/subscription…
reactive/data-client
Define REST APIs with @data-client/rest - resource(), RestEndpoint, CRUD (GET/POST/PUT/PATCH/DELETE), HTTP fetch, normalize, cache, urlPrefix, path-to-regexp parameters, searchParams, pagination…
reactive/data-client
Model data with @data-client schemas (Entity, EntityMixin, Collection, Union, Query, Values, All, Invalidate, Lazy, Scalar) for atomic, consistent, referentially-equal async data via normalization…
reactive/data-client
Use @data-client/vue composables for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, useLoading, useDebounce…
Works with
Categories
Use @data-client/react hooks for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, DataProvider, AsyncBoundary…. Data Client React is an agent skill from reactive/data-client. Use @data-client/react hooks for data fetching, mutations, and rendering - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController, DataProvider, AsyncBoundary, useLoading, useDebounce.
Data Client React fits situations like: reading/rendering remote data; triggering mutations; doing optimistic updates; real-time subscriptions.
Run `npx skills add reactive/data-client --skill data-client-react -a claude-code`. Or copy the skill folder (.agents/skills/data-client-react in reactive/data-client) into .claude/skills/data-client-react in your project. Claude Code loads it when a task matches its description.
Run `npx skills add reactive/data-client --skill data-client-react -a codex`. Or copy the skill folder (.agents/skills/data-client-react in reactive/data-client) into .agents/skills/data-client-react in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add reactive/data-client --skill data-client-react -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/data-client-react, .gemini/skills/data-client-react, .github/skills/data-client-react and .opencode/skills/data-client-react in your project.
SKILL.md names no scripts, command-line tools or credentials: Data Client React is instructions for the agent only.
SKILL.md names 2 domains. In commands or code: jsonplaceholder.typicode.com; the agent is likely to contact it when it follows the instructions. As links in the text: dataclient.io. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Data Client React is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 38k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Data Client React: React Fetch Cache Patterns (pproenca/dot-skills, 214 stars), Typescript Rules (shinpr/claude-code-workflows, 690 stars), React UI State Patterns (ChrisWiles/claude-code-showcase, 6.1k stars) and @pierre/diffs Code Rendering (pierrecomputer/pierre, 6.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
reactive (a GitHub organization) maintains it in reactive/data-client, which has 2,037 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.
Source: reactive/data-client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.