plugins/smedjen/skills/expo-data-fetching/SKILL.md
Data fetching in Expo — fetch, React Query, SWR, offline support, and caching strategies
npx skillsauth add hjemmesidekongen/ai expo-data-fetchingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
React Native has fetch built in — but raw fetch in useEffect creates unreliable, verbose patterns. React Query is the standard for server state in Expo apps.
Wrap the root layout in QueryClientProvider. Set staleTime, retry, and refetchOnWindowFocus: false in defaults — mobile apps don't have browser windows, so the default focus refetch fires unexpectedly without this.
const { data, isLoading, error } = useQuery({
queryKey: queryKeys.users.detail(userId),
queryFn: () => fetchUser(userId),
enabled: !!userId,
});
const mutation = useMutation({
mutationFn: updateUser,
onSuccess: (user) =>
queryClient.invalidateQueries({ queryKey: queryKeys.users.all }),
});
useState.isLoading and error before accessing data.staleTime in defaults to reduce unnecessary refetches on screen focus.See references/process.md for SWR patterns, offline strategies (AsyncStorage, MMKV, WatermelonDB), optimistic updates, infinite queries, cache persistence, error handling, type-safe fetching, and anti-patterns.
development
Creates a brand from scratch through market research and interactive sparring. Runs competitive research via Perplexity, then guides the user through positioning, audience, voice, values, and content pillars. Produces the full brand guideline set at .ai/brand/{name}/. Use when building a new brand, defining brand strategy for a product, or when /våbenskjold:create is invoked.
testing
Loads brand guidelines from .ai/brand/{name}/ and makes them available to the current context. Progressive disclosure: L1 confirms brand exists, L2 loads summary, L3 loads specific files on demand. Use when a downstream skill or user needs brand context, or when /våbenskjold:apply is invoked.
documentation
Guided reinvention of an existing brand guideline. Loads current brand from .ai/brand/{name}/, identifies what to keep vs change, and walks the user through targeted evolution. Preserves brand equity while updating positioning, voice, or values. Use when refreshing a brand or when /våbenskjold:evolve is invoked.
development
Codifies an existing brand from materials, samples, and references. Analyzes provided content to extract voice patterns, values, and positioning. Produces the same guideline format as brand-strategy. Use when a brand already exists but isn't documented, or when /våbenskjold:audit is invoked.