borghei/Claude-Skills / engineering/senior-frontend
senior-frontend
VerifiedScaffold Next.js 16 or React + Vite 8 apps, generate components with tests and stories, and flag heavy bundle dependencies. Use when starting a React project, adding components or hooks, or reviewing frontend code or performance.
assets/templates/scaffold/files/query_client.ts
View on GitHubimport { QueryClient, isServer } from '@tanstack/react-query';
export function makeQueryClient(): QueryClient {
return new QueryClient({
defaultOptions: {
queries: {
// Above zero so the client does not refetch data the server just rendered
staleTime: 60 * 1000,
retry: 1,
refetchOnWindowFocus: false,
},
},
});
}
let browserQueryClient: QueryClient | undefined;
/** A fresh client per server render, one shared client in the browser. */
export function getQueryClient(): QueryClient {
if (isServer) return makeQueryClient();
browserQueryClient ??= makeQueryClient();
return browserQueryClient;
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |