frontend-dev-guidelines

Generate React/TypeScript frontend guidelines with TanStack Query and MUI v7.

Updated Nov 3, 2025
One-click install
npx skills add https://github.com/duckviet/njs-go-penapi-cci --skill frontend-dev-guidelines-duckviet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-dev-guidelines
Source: https://github.com/duckviet/njs-go-penapi-cci/tree/main/.claude/skills/frontend-dev-guidelines
Command: npx skills add https://github.com/duckviet/njs-go-penapi-cci --skill frontend-dev-guidelines-duckviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of inconsistent, slow, and complex frontend development by providing a standardized, high-performance approach for React/TypeScript applications. It reduces development time, improves code quality, and ensures a consistent user experience by automating the application of best practices.

Core Features & Use Cases

  • Suspense-based Data Fetching: Automates loading states and simplifies data management with useSuspenseQuery and TanStack Query, eliminating manual isLoading checks.
  • Modern Component Patterns: Guides on lazy loading, proper file organization (Feature-Sliced Design), and performance optimization using useMemo, useCallback, and React.memo.
  • Integrated Tooling: Provides best practices for MUI v7 styling, TanStack Router, React Hook Form with Zod validation, and strict TypeScript standards.
  • Use Case: When starting a new React feature or component, activate this Skill to automatically apply the correct file structure, implement Suspense for data fetching, ensure lazy loading, and adhere to styling and routing conventions, saving hours of setup and review.

Quick Start

To create a new React component, follow the "New Component Checklist" in the frontend-dev-guidelines skill. For example, to create a lazy-loaded component with data fetching: 1. Define props interface with JSDoc. 2. Use useSuspenseQuery for data fetching. 3. Wrap the component in <SuspenseLoader>. 4. Export the component with React.lazy for code splitting.

Frequently Asked Questions about frontend-dev-guidelines

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

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

Suspense-based data fetching uses `useSuspenseQuery` from TanStack Query to handle loading states automatically. Define your component with a props interface, fetch data with `useSuspenseQuery`, wrap it in `<SuspenseLoader>`, and export via `React.lazy` for code splitting. This eliminates manual `isLoading` checks and simplifies data management.

What's the best way to organize files in a React TypeScript project?

Use Feature-Sliced Design with explicit folder structures: organize code into `features`, `entities`, and `shared` directories. This approach improves maintainability, reduces naming conflicts, and enforces consistent file organization across your React application.

Can I use TanStack Query and TanStack Router with MUI v7 styling?

Yes. This Skill provides integrated best practices for using TanStack Query for data fetching, TanStack Router for routing, and MUI v7 for styling in a cohesive React TypeScript stack. React Hook Form with Zod validation complements this tooling for form handling.

How do I optimize React component performance with lazy loading and memoization?

Apply performance optimization by using lazy loading with `React.lazy`, memoization with `useMemo` and `useCallback`, and component-level memoization with `React.memo`. These patterns reduce unnecessary re-renders and improve application speed.

What are the key steps to set up a new React feature following frontend guidelines?

Follow the New Component Checklist: define a props interface with JSDoc, use `useSuspenseQuery` for data fetching, wrap components in `<SuspenseLoader>`, and export with `React.lazy`. Organize code into feature-based folders and enforce strict TypeScript with consistent alias conventions.

Do I need strict TypeScript to use these frontend development guidelines?

Yes. Strict TypeScript usage is enforced as part of these guidelines to catch type errors at compile time and improve code reliability. Paired with JSDoc annotations and consistent alias conventions, it ensures maintainable and predictable React applications.