lobehub avatar

Data Fetching

This is LobeHub's opinionated data fetching architecture that enforces a three-layer pattern: Service layer wraps all lambdaClient calls, Zustand stores expose SWR hooks instead of useEffect, and components call useFetchXxx hooks that handle loading states and cache invalidation. The skill covers the complete flow from service class setup through store actions with optimistic updates, including naming conventions like useFetchBenchmarks for reads and refreshBenchmarks for cache busting. It's strict about what not to do, no direct lambdaClient calls in components, no useEffect for data loading, no useState for server data. Works well if you want enforced separation of concerns and are already using this exact stack.

skills.sh installs
812
GitHub stars
84.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add lobehub/lobehub --skill data-fetching --agent claude-code

Installs into .claude/skills of the current project.

Files

This is LobeHub's opinionated data fetching architecture that enforces a three-layer pattern: Service layer wraps all lambdaClient calls, Zustand stores expose SWR hooks instead of useEffect, and components call useFetchXxx hooks that handle loading states and cache invalidation. The skill covers the complete flow from service class setup through store actions with optimistic updates, including naming conventions like useFetchBenchmarks for reads and refreshBenchmarks for cache busting. It's strict about what not to do, no direct lambdaClient calls in components, no useEffect for data loading, no useState for server data. Works well if you want enforced separation of concerns and are already using this exact stack.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/lobehub/lobehub
Categories
Frontend Development, Backend & APIs, Documentation, Code Review & Quality
First seen
May 16, 2026

More from lobehub/lobehub

All 26
1pproenca avatartypescript-refactorpproenca/dot-skillsTypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should b799skills.sh installs
2alirezarezvani avatarcode-to-prdalirezarezvani/claude-skillsReverse-engineer any codebase into a complete Product Requirements Document (PRD). Analyzes routes, components, state management, API integrations, and user int798skills.sh installs
3mindrally avatarstyled-components-best-practicesmindrally/skillsstyled-components best practices for CSS-in-JS development in React applications787skills.sh installs
4jezweb avatarmotionjezweb/claude-skillsBuild React animations with Motion (Framer Motion) - gestures (drag, hover, tap), scroll effects, spring physics, layout animations, SVG. Bundle: 2.3 KB (mini) 785skills.sh installs
5alirezarezvani avatarlanding-page-generatoralirezarezvani/claude-skillsGenerates high-converting landing pages as complete Next.js/React (TSX) components with Tailwind CSS. Creates hero sections, feature grids, pricing tables, FAQ 777skills.sh installs
6adobe avatarappbuilder-testingadobe/skillsGenerate and run tests for Adobe App Builder actions and UI components. Scaffolds Jest unit tests, integration tests against deployed actions, contract tests fo766skills.sh installs