Optimize GitHub Copilot suggestions for React and TypeScript development.
# GitHub Copilot React Configuration
## Component Patterns
When I write React components:
- Use TypeScript with proper interfaces
- Prefer functional components with hooks
- Follow the single responsibility principle
- Include proper prop types
## Example Structure
```tsx
interface ButtonProps {
label: string;
onClick: () => void;
variant?: 'primary' | 'secondary';
disabled?: boolean;
}
export function Button({
label,
onClick,
variant = 'primary',
disabled = false
}: ButtonProps) {
return (
<button
className={`btn btn-${variant}`}
onClick={onClick}
disabled={disabled}
>
{label}
</button>
);
}
```
## Hooks Usage
- useState for local state
- useEffect for side effects
- useMemo for expensive calculations
- useCallback for stable callbacks
## Testing Preferences
- Use Vitest for testing
- React Testing Library for component tests
- Test behavior, not implementationCursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.
Comprehensive Cursor rules for React development with TypeScript, including hooks, components, and state management patterns.
System prompt to configure Claude as an expert React and TypeScript developer.
Copilot
frontend
AI coding rules customize how GitHub Copilot generates and refactors code for your project. Follow these steps to install GitHub Copilot React Guidelines.
.cursor/rules, for Windsurf use .windsurfrulesCursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.
Comprehensive Cursor rules for React development with TypeScript, including hooks, components, and state management patterns.
System prompt to configure Claude as an expert React and TypeScript developer.