Frontend Engineer
Comprehensive guide for modern React development, emphasizing Suspense-based data fetching, lazy loading, proper file organization, and performance optimization.
When to Use
- Creating new components or pages
- Building new features
- Fetching data with TanStack Query
- Setting up routing with TanStack Router
- Styling components
- Performance optimization
- Organizing frontend code
- TypeScript best practices
Quick Start
New Component Checklist
New Feature Checklist
Core Principles
- Lazy Load Everything Heavy: Routes, DataGrid, charts, editors
- Suspense for Loading: Use SuspenseLoader, not early returns
- useSuspenseQuery: Primary data fetching pattern for new code
- Features are Organized: api/, components/, hooks/, helpers/ subdirs
- Styles Based on Size: <100 inline, >100 separate
- Import Aliases: Use @/, ~types, ~components, ~features
- No Early Returns: Prevents layout shift
- TypeScript First: Strict mode, no
any type
Implementation Workflow
When implementing frontend code:
- Check for existing workflow patterns (spec-first, TDD, etc.) and follow them
- Ensure code passes CI checks (types, tests, lint) before committing
- Group related changes with tests in atomic commits
References
For detailed guidance, see:
references/component-patterns.md - Modern React component patterns
references/data-fetching.md - Suspense-based data fetching
references/file-organization.md - Feature-based organization
references/styling-guide.md - Styling patterns and best practices
references/routing-guide.md - TanStack Router patterns
references/performance.md - Performance optimization
references/typescript-standards.md - TypeScript best practices
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: frontend-engineer3description: Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code. Use when this capability is needed.4---56# Frontend Engineer78Comprehensive guide for modern React development, emphasizing Suspense-based data fetching, lazy loading, proper file organization, and performance optimization.910## When to Use1112- Creating new components or pages13- Building new features14- Fetching data with TanStack Query15- Setting up routing with TanStack Router16- Styling components17- Performance optimization18- Organizing frontend code19- TypeScript best practices2021## Quick Start2223### New Component Checklist2425- [ ] Use `React.FC<Props>` pattern with TypeScript26- [ ] Lazy load if heavy component: `React.lazy(() => import())`27- [ ] Wrap in `<SuspenseLoader>` for loading states28- [ ] Use `useSuspenseQuery` for data fetching29- [ ] Import aliases: `@/`, `~types`, `~components`, `~features`30- [ ] Styles: Inline if <100 lines, separate file if >100 lines31- [ ] Use `useCallback` for event handlers passed to children32- [ ] Default export at bottom33- [ ] No early returns with loading spinners34- [ ] Use notification system for user feedback3536### New Feature Checklist3738- [ ] Create `features/{feature-name}/` directory39- [ ] Create subdirectories: `api/`, `components/`, `hooks/`, `helpers/`, `types/`40- [ ] Create API service file: `api/{feature}Api.ts`41- [ ] Set up TypeScript types in `types/`42- [ ] Create route in `routes/{feature-name}/index.tsx`43- [ ] Lazy load feature components44- [ ] Use Suspense boundaries45- [ ] Export public API from feature `index.ts`4647## Core Principles48491. **Lazy Load Everything Heavy:** Routes, DataGrid, charts, editors502. **Suspense for Loading:** Use SuspenseLoader, not early returns513. **useSuspenseQuery:** Primary data fetching pattern for new code524. **Features are Organized:** api/, components/, hooks/, helpers/ subdirs535. **Styles Based on Size:** <100 inline, >100 separate546. **Import Aliases:** Use @/, ~types, ~components, ~features557. **No Early Returns:** Prevents layout shift568. **TypeScript First:** Strict mode, no `any` type5758## Implementation Workflow5960When implementing frontend code:61- Check for existing workflow patterns (spec-first, TDD, etc.) and follow them62- Ensure code passes CI checks (types, tests, lint) before committing63- Group related changes with tests in atomic commits6465## References6667For detailed guidance, see:68- `references/component-patterns.md` - Modern React component patterns69- `references/data-fetching.md` - Suspense-based data fetching70- `references/file-organization.md` - Feature-based organization71- `references/styling-guide.md` - Styling patterns and best practices72- `references/routing-guide.md` - TanStack Router patterns73- `references/performance.md` - Performance optimization74- `references/typescript-standards.md` - TypeScript best practices7576---77> Converted and distributed by [TomeVault](https://tomevault.io/claim/siviter-xyz) — claim your Tome and manage your conversions.78<!-- tomevault:4.0:skill_md:2026-04-11 -->