frontend-dev-guidelines

Guide React/TypeScript frontend development with Suspense, lazy loading, and MUI v7 styling.

2|Updated Feb 22, 2024
One-click install
npx skills add https://github.com/ddttom/allaboutv2 --skill frontend-dev-guidelines-ddttom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/ddttom/allaboutv2/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/ddttom/allaboutv2 --skill frontend-dev-guidelines-ddttom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines for building modern React applications with TypeScript, focusing on Suspense-based data fetching, lazy loading, and performance optimization.

Core Features & Use Cases

  • Modern React Patterns: Complete coverage of React.FC, lazy loading, Suspense boundaries, and modern hooks patterns.
  • Performance Optimization: Implements cache-first strategies, memoization, and prevents layout shift for optimal user experience.
  • Use Case: When creating a new user profile component, use this Skill to implement useSuspenseQuery, wrap in SuspenseLoader, and follow file organization standards.
  • Real-World Example: Building a dashboard with parallel data fetching, lazy-loaded sections, and responsive MUI v7 styling.

Quick Start

Create a new component using React.FC pattern, lazy load heavy dependencies, wrap in SuspenseLoader, and use useSuspenseQuery for data fetching.

Core Features & Use Cases

  • Component Architecture: Standardized patterns for React.FC, lazy loading, and Suspense boundaries.

Quick Start

Use this Skill when creating a new user profile page with lazy loading and Suspense-based data fetching.

Frequently Asked Questions about frontend-dev-guidelines

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

FAQPage Schema
How do I implement Suspense-based data fetching in React with TypeScript?

Suspense-based data fetching in React uses useSuspenseQuery from TanStack Query to handle async data loading declaratively. Wrap components in SuspenseLoader boundaries, define your data queries with proper TypeScript types, and React automatically manages loading and error states without callback chains.

What's the best way to organize a React application with feature-based folders?

Feature-based folder organization groups related components, pages, and services by feature rather than by type. This Skill defines folder structure standards that co-locate React.FC components, lazy-loaded modules, API services, and MUI styling within each feature directory for better maintainability and scalability.

How do I lazy load components and prevent performance issues in React?

Lazy loading splits code into chunks using React.lazy and suspends rendering until chunks load. Pair with Suspense boundaries and implement cache-first strategies via TanStack Query to prevent layout shift and optimize bundle size while maintaining responsive user experience.

Can I use MUI v7 styling with TypeScript in modern React applications?

MUI v7 integrates with TypeScript through the sx prop and styled components, providing type-safe styling without CSS-in-JS overhead. This Skill covers standardized MUI v7 styling patterns aligned with performance optimization and component architecture best practices.

What are the key differences between TanStack Query and traditional data fetching patterns?

TanStack Query manages server state, caching, and synchronization automatically, eliminating manual fetch calls and state management. useSuspenseQuery integrates with React Suspense for declarative loading boundaries, reducing boilerplate compared to useState/useEffect patterns.

When should I use lazy loading with Suspense instead of conditional rendering?

Lazy loading with Suspense suits heavy components, routes, and features loaded on demand, preventing initial bundle bloat. Use it when components load infrequently or conditionally; reserve conditional rendering for lightweight toggles already in memory.