frontend-dev-guidelines

Consolidate React/TypeScript frontend development guidelines for components, data fetching, routing, and styling.

10.0k|1.2k|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/diet103/claude-code-infrastructure-showcase --skill frontend-dev-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/diet103/claude-code-infrastructure-showcase --skill frontend-dev-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to modern React development, solving the problem of inconsistent codebases, slow performance, and complex state management. It ensures developers follow best practices for building scalable, maintainable, and high-performing frontend applications.

Core Features & Use Cases

  • Suspense-Based Data Fetching: Guides on using useSuspenseQuery with Suspense boundaries to eliminate isLoading checks and provide a smoother user experience.
  • Modern Component Patterns: Covers lazy loading, React.FC<Props>, useCallback, useMemo, and proper component organization to optimize rendering and bundle size.
  • Performance Optimization: Best practices for preventing unnecessary re-renders, debouncing, and memory leak prevention.
  • Use Case: When you're tasked with creating a new feature in a React/TypeScript application, use this Skill to ensure every component, data fetch, and styling choice adheres to the latest patterns, from file organization to error handling, guaranteeing a consistent and performant implementation.

Quick Start

Generate a new React component following the modern component template, including useSuspenseQuery for data fetching and useCallback for event handlers, and explain how to wrap it in a SuspenseLoader.

Frequently Asked Questions about frontend-dev-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a React component with Suspense-based data fetching?

Use React.FC with useSuspenseQuery for data fetching and wrap components in Suspense boundaries to eliminate isLoading checks. This pattern provides automatic loading state handling and cleaner component logic while improving user experience.

What's the best way to organize a React/TypeScript codebase with performance in mind?

Organize code using a features directory structure with import aliases, apply lazy loading for routes, use React.FC components with useCallback and useMemo, and style with MUI sx. This structure scales maintainability, reduces bundle size, and prevents unnecessary re-renders.

How do I prevent performance issues in React applications?

Optimize rendering with useCallback for event handlers and useMemo for expensive computations, implement lazy loading for code splitting, use Suspense boundaries for data fetching, and follow strict TypeScript typing. These practices eliminate memory leaks, unnecessary re-renders, and improve load times.

Can I use TanStack Query and TanStack Router together in a modern React app?

Yes. TanStack Query handles server state with useSuspenseQuery while TanStack Router manages navigation and page organization. Combined with a features directory and MUI v7 styling, they form a complete frontend stack for scalable React/TypeScript applications.

Why should I use MUI v7 with TanStack Query in React development?

MUI v7 integrates with modern React patterns through sx styling, pairs seamlessly with useSuspenseQuery for Suspense-aware UI, and supports TypeScript strict mode. This combination ensures consistent design, type safety, and performance across components.

When should I apply lazy loading and Suspense in React?

Use lazy loading for route-level code splitting and Suspense boundaries when data fetching with useSuspenseQuery. Apply this pattern whenever creating components, pages, or features to reduce initial bundle size and provide smooth loading states without manual isLoading logic.