A React Native application for tracking and managing data.
We use React.FC (Function Component) type for all React components. Props should be defined inline with the component type rather than as separate interfaces.
✅ Good:
export const MyComponent: React.FC<{
title: string;
onPress: () => void;
}> = ({ title, onPress }) => (
// Component implementation
);❌ Bad:
interface MyComponentProps {
title: string;
onPress: () => void;
}
export const MyComponent = ({ title, onPress }: MyComponentProps) => (
// Component implementation
);We use NativeWind (Tailwind CSS for React Native) for all styling. Avoid using StyleSheet.create() or inline styles. However, if it is unavoidable due to using containerStyles, it is allowed.
✅ Good:
<View className="flex-1 bg-white p-4">
<Text className="text-lg font-bold">Hello World</Text>
</View>❌ Bad:
<View style={styles.container}>
<Text style={styles.title}>Hello World</Text>
</View>- Components are stored in the
src/componentsdirectory - Screens are stored in the
src/screensdirectory - Hooks are stored in the
src/hooksdirectory - Types are stored in the
src/typesdirectory
- Component files use PascalCase (e.g.,
DataCard.tsx) - Hook files use camelCase with 'use' prefix (e.g.,
useDashboardData.ts) - Type files use PascalCase (e.g.,
Dashboard.ts)
- Install dependencies:
npm install- Start the development server:
npm start- Run on iOS:
npm run ios- Run on Android:
npm run android- Use TypeScript for all new code
- Write tests for new components and features
- Follow the coding conventions outlined above
- Use meaningful commit messages
- Keep components small and focused
- Use proper error handling
- Document complex logic with comments
할일 AuthScreen 토큰재발급 삭제 UI