원클릭으로
react-native-data-fetching-api
Guidelines for managing server state, queries, and API clients in React Native.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guidelines for managing server state, queries, and API clients in React Native.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Mandatory rules and components for handling keyboard avoidance smoothly in the React Native app.
How to correctly handle and format protobuf Timestamp dates sent by the API Gateway to prevent "Invalid Date" issues.
Senior-level React Native architecture and patterns for Expo 54 apps.
Strict coding standards, naming conventions, file size limits, and typing rules.
Best practices for implementing forms with React Hook Form and Zod.
Mandatory rule to never use deprecated APIs or ignore deprecation warnings.
| name | React Native Data Fetching & API |
| description | Guidelines for managing server state, queries, and API clients in React Native. |
This app uses TanStack React Query coupled with a custom Axios API Client.
apiFetch)All network requests MUST use the internal apiFetch wrapper located in src/api/client.ts.
import { apiFetch } from '@/api/client';
// Example of a typical fetch call
const fetchUser = async (userId: string) => {
return apiFetch<UserResponse>(`/users/${userId}`, {
method: 'GET',
requiresAuth: true,
});
};
axios directly in your screens or hooks.apiFetch automatically handles Authorization Headers and Error wrapping.Use React Query for all server state management.
['users', userId].Always wrap useQuery and useMutation in custom hooks.
// ❌ BAD
const { data } = useQuery({ queryKey: ['users'], queryFn: fetchUsers });
// ✅ GOOD
export const useUsers = () => {
return useQuery({
queryKey: ['users'],
queryFn: fetchUsers,
});
};
apiFetch throws errors using the custom createApiError factory.useMutation, handle errors gracefully, typically by showing a toast or alert, but prefer doing it within the component's onError callback or via a global error boundary.[!IMPORTANT] Do not use
useEffect+useStateto fetch data. React Query is the standard.