Frontend Developer Skill
Purpose
Provides complete frontend development expertise for building production-ready web applications with modern frameworks (React, Vue, Next.js), comprehensive tooling setup, state management patterns, testing infrastructure, and performance optimization strategies.
When to Use
- Building new React, Vue, or Angular applications from scratch
- Setting up modern frontend tooling (Vite, ESLint, Prettier, testing frameworks)
- Implementing state management with Redux Toolkit, Zustand, or Context API
- Configuring authentication flows with token management and protected routes
- Optimizing bundle size and performance for production deployments
- Creating component libraries and design systems
- Setting up comprehensive testing (unit, integration, E2E)
Quick Start
Invoke this skill when:
- Building React, Vue, or Angular applications
- Setting up frontend tooling (Vite, ESLint, Prettier)
- Implementing state management (Redux Toolkit, Zustand, Context)
- Configuring authentication flows
- Optimizing bundle size and performance
- Setting up testing (Vitest, Jest, Playwright)
Do NOT invoke when:
- Only backend API needed → Use backend-developer
- Database optimization → Use database-optimizer
- DevOps/deployment only → Use devops-engineer
- UI/UX design without code → Use ui-designer
Decision Framework
Framework Selection
Frontend Framework Selection
├─ New Project (greenfield)
│ ├─ Needs SEO + server-side rendering
│ │ ├─ Team knows React → Next.js 14+
│ │ ├─ Team knows Vue → Nuxt.js 3+
│ │ └─ Team flexible → Next.js (ecosystem advantage)
│ │
│ ├─ SPA without SSR requirements
│ │ ├─ React experience → React 18+ (Vite)
│ │ ├─ Vue experience → Vue 3 (Vite)
│ │ └─ Enterprise/complex forms → Angular 15+
│ │
│ └─ Static site (blog, docs)
│ └─ Astro, Next.js SSG, or Vite + React
│
└─ Existing Project
└─ Continue with existing framework (consistency)
State Management Selection
| Scenario |
Library |
Bundle Size |
Use Case |
| Simple local state |
useState, useReducer |
0 KB |
Component-level state |
| Shared state (2-3 components) |
Context API |
0 KB |
Theme, auth, simple global |
| Medium app (<10 slices) |
Zustand |
~1 KB |
Most apps, good DX |
| Large app (10+ slices) |
Redux Toolkit |
~11 KB |
Enterprise, time-travel debug |
| Server state |
TanStack Query |
~12 KB |
API data, caching |
Styling Approach
Styling Decision
├─ Rapid prototyping → Tailwind CSS
├─ Component library → Radix UI + Tailwind
├─ Dynamic theming → CSS-in-JS (Styled Components, Emotion)
├─ Large team → CSS Modules or Tailwind + Design Tokens
└─ Performance-critical → Plain CSS / SCSS
Best Practices
- Use functional components - Modern React pattern
- Leverage hooks - Avoid class components when possible
- Memoize expensive operations - Use useMemo, useCallback
- Lazy load components - Reduce initial bundle size
- Type everything - Leverage TypeScript
- Test thoroughly - Unit, integration, and E2E tests
- Optimize images - Use modern formats and lazy loading
- Implement error boundaries - Catch errors gracefully
- Make it accessible - ARIA labels, keyboard navigation
- Monitor performance - Track Core Web Vitals
Common Patterns
Custom Hooks
function useFetch<T>(url: string) {
const [data, setData] = useState<T | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
fetch(url)
.then(res => res.json())
.then(setData)
.catch(setError)
.finally(() => setLoading(false));
}, [url]);
return { data, loading, error };
}
Container/Presentational
// Presentational (dumb)
const UserList = ({ users, onUserClick }: UserListProps) => (
<ul>
{users.map(user => (
<li key={user.id} => onUserClick(user.id)}>
{user.name}
</li>
))}
</ul>
);
// Container (smart)
const UserListContainer = () => {
const { users, fetchUsers } = useUsers();
useEffect(() => fetchUsers(), [fetchUsers]);
return <UserList users={users} />;
};
Troubleshooting
Common Issues
State not updating
- Check if using correct setter
- Verify dependency arrays in useEffect
- Ensure components are re-rendering
Component not re-rendering
- Check for unnecessary re-renders
- Verify memoization is working
- Review prop changes
Performance issues
- Profile with React DevTools
- Check for large bundle sizes
- Review unnecessary re-renders
- Implement code splitting
Tests failing
- Verify test setup
- Check mock implementations
- Review async handling
- Ensure proper cleanup
Quality Checklist
Architecture
Code Quality
Performance
Testing
Security
Integration Patterns
react-specialist
- Handoff: frontend-developer sets up tooling → react-specialist implements complex component logic
- Tools: Both use React; frontend-developer handles ecosystem tooling
nextjs-developer
- Handoff: When SSR/SEO required → hand off for Next.js-specific features
- Tools: frontend-developer uses Vite/CRA; nextjs-developer uses Next.js App Router
backend-developer
- Handoff: frontend-developer implements API client → backend-developer provides API contracts
- Tools: frontend-developer uses Axios/Fetch, TanStack Query
frontend-ui-ux-engineer
- Handoff: frontend-developer sets up component structure → frontend-ui-ux-engineer styles
- Tools: Both use React; frontend-ui-ux-engineer adds Framer Motion, Tailwind design tokens
Additional Resources
- Detailed Technical Reference: See REFERENCE.md
- Code Examples & Patterns: See EXAMPLES.md
1---2name: frontend-developer-skill3description: Comprehensive frontend development specialist for building modern web applications with React, Vue, Angular, and modern tooling including state management, testing, and performance optimization4---56# Frontend Developer Skill78## Purpose910Provides complete frontend development expertise for building production-ready web applications with modern frameworks (React, Vue, Next.js), comprehensive tooling setup, state management patterns, testing infrastructure, and performance optimization strategies.1112## When to Use1314- Building new React, Vue, or Angular applications from scratch15- Setting up modern frontend tooling (Vite, ESLint, Prettier, testing frameworks)16- Implementing state management with Redux Toolkit, Zustand, or Context API17- Configuring authentication flows with token management and protected routes18- Optimizing bundle size and performance for production deployments19- Creating component libraries and design systems20- Setting up comprehensive testing (unit, integration, E2E)2122## Quick Start2324**Invoke this skill when:**25- Building React, Vue, or Angular applications26- Setting up frontend tooling (Vite, ESLint, Prettier)27- Implementing state management (Redux Toolkit, Zustand, Context)28- Configuring authentication flows29- Optimizing bundle size and performance30- Setting up testing (Vitest, Jest, Playwright)3132**Do NOT invoke when:**33- Only backend API needed → Use backend-developer34- Database optimization → Use database-optimizer35- DevOps/deployment only → Use devops-engineer36- UI/UX design without code → Use ui-designer3738## Decision Framework3940### Framework Selection4142```43Frontend Framework Selection44├─ New Project (greenfield)45│ ├─ Needs SEO + server-side rendering46│ │ ├─ Team knows React → Next.js 14+47│ │ ├─ Team knows Vue → Nuxt.js 3+48│ │ └─ Team flexible → Next.js (ecosystem advantage)49│ │50│ ├─ SPA without SSR requirements51│ │ ├─ React experience → React 18+ (Vite)52│ │ ├─ Vue experience → Vue 3 (Vite)53│ │ └─ Enterprise/complex forms → Angular 15+54│ │55│ └─ Static site (blog, docs)56│ └─ Astro, Next.js SSG, or Vite + React57│58└─ Existing Project59 └─ Continue with existing framework (consistency)60```6162### State Management Selection6364| Scenario | Library | Bundle Size | Use Case |65|----------|---------|-------------|----------|66| Simple local state | useState, useReducer | 0 KB | Component-level state |67| Shared state (2-3 components) | Context API | 0 KB | Theme, auth, simple global |68| Medium app (<10 slices) | Zustand | ~1 KB | Most apps, good DX |69| Large app (10+ slices) | Redux Toolkit | ~11 KB | Enterprise, time-travel debug |70| Server state | TanStack Query | ~12 KB | API data, caching |7172### Styling Approach7374```75Styling Decision76├─ Rapid prototyping → Tailwind CSS77├─ Component library → Radix UI + Tailwind78├─ Dynamic theming → CSS-in-JS (Styled Components, Emotion)79├─ Large team → CSS Modules or Tailwind + Design Tokens80└─ Performance-critical → Plain CSS / SCSS81```8283## Best Practices84851. **Use functional components** - Modern React pattern862. **Leverage hooks** - Avoid class components when possible873. **Memoize expensive operations** - Use useMemo, useCallback884. **Lazy load components** - Reduce initial bundle size895. **Type everything** - Leverage TypeScript906. **Test thoroughly** - Unit, integration, and E2E tests917. **Optimize images** - Use modern formats and lazy loading928. **Implement error boundaries** - Catch errors gracefully939. **Make it accessible** - ARIA labels, keyboard navigation9410. **Monitor performance** - Track Core Web Vitals9596## Common Patterns9798### Custom Hooks99100```typescript101function useFetch<T>(url: string) {102 const [data, setData] = useState<T | null>(null);103 const [loading, setLoading] = useState(true);104 const [error, setError] = useState<string | null>(null);105106 useEffect(() => {107 fetch(url)108 .then(res => res.json())109 .then(setData)110 .catch(setError)111 .finally(() => setLoading(false));112 }, [url]);113114 return { data, loading, error };115}116```117118### Container/Presentational119120```typescript121// Presentational (dumb)122const UserList = ({ users, onUserClick }: UserListProps) => (123 <ul>124 {users.map(user => (125 <li key={user.id} onClick={() => onUserClick(user.id)}>126 {user.name}127 </li>128 ))}129 </ul>130);131132// Container (smart)133const UserListContainer = () => {134 const { users, fetchUsers } = useUsers();135 useEffect(() => fetchUsers(), [fetchUsers]);136 return <UserList users={users} onUserClick={handleClick} />;137};138```139140## Troubleshooting141142### Common Issues143144**State not updating**145- Check if using correct setter146- Verify dependency arrays in useEffect147- Ensure components are re-rendering148149**Component not re-rendering**150- Check for unnecessary re-renders151- Verify memoization is working152- Review prop changes153154**Performance issues**155- Profile with React DevTools156- Check for large bundle sizes157- Review unnecessary re-renders158- Implement code splitting159160**Tests failing**161- Verify test setup162- Check mock implementations163- Review async handling164- Ensure proper cleanup165166## Quality Checklist167168### Architecture169- [ ] Framework choice justified170- [ ] State management clear (server vs client state separated)171- [ ] Component structure logical172- [ ] Code splitting implemented173174### Code Quality175- [ ] TypeScript strict mode enabled176- [ ] ESLint + Prettier configured177- [ ] Tests exist for critical paths178- [ ] No prop drilling (use state management)179180### Performance181- [ ] Bundle size optimized (<200KB gzipped)182- [ ] Expensive operations memoized183- [ ] Images optimized (lazy loading, WebP)184- [ ] Third-party libraries evaluated185186### Testing187- [ ] Testing framework configured188- [ ] Critical paths tested189- [ ] E2E tests exist190191### Security192- [ ] Environment variables secured193- [ ] Input sanitization194- [ ] Auth tokens secure195- [ ] Dependencies audited196197## Integration Patterns198199### react-specialist200- **Handoff:** frontend-developer sets up tooling → react-specialist implements complex component logic201- **Tools:** Both use React; frontend-developer handles ecosystem tooling202203### nextjs-developer204- **Handoff:** When SSR/SEO required → hand off for Next.js-specific features205- **Tools:** frontend-developer uses Vite/CRA; nextjs-developer uses Next.js App Router206207### backend-developer208- **Handoff:** frontend-developer implements API client → backend-developer provides API contracts209- **Tools:** frontend-developer uses Axios/Fetch, TanStack Query210211### frontend-ui-ux-engineer212- **Handoff:** frontend-developer sets up component structure → frontend-ui-ux-engineer styles213- **Tools:** Both use React; frontend-ui-ux-engineer adds Framer Motion, Tailwind design tokens214215## Additional Resources216217- **Detailed Technical Reference**: See [REFERENCE.md](REFERENCE.md)218- **Code Examples & Patterns**: See [EXAMPLES.md](EXAMPLES.md)