PluginBench
Rule

typescript react

via PatrickJS/awesome-cursorrules

TypeScript React development with functional components and strict typing.

What is typescript react?

Configures Cursor for TypeScript React projects using functional components, hooks, and strict type checking. Use this rule when building React applications with TypeScript to enforce best practices around component structure, prop typing, and code organization.

  • Enforces functional components with React.FC and proper prop interfaces
  • Guides hook usage (useState, useEffect) and custom hook creation
  • Recommends folder structure separating components, hooks, pages, types, and utils
  • Enables code-splitting via React.lazy and Suspense for performance
  • Suggests error boundaries and ESLint configuration for code quality
  • Promotes TypeScript strict mode and type inference patterns

Applies to

File patterns this rule matches.

**/*
Rule definition (reference)

Source of truth, from the repository.

// TypeScript React .cursorrules

// Prefer functional components

const preferFunctionalComponents = true;

// TypeScript React best practices

const typescriptReactBestPractices = [ "Use React.FC for functional components with props", "Utilize useState and useEffect hooks for state and side effects", "Implement proper TypeScript interfaces for props and state", "Use React.memo for performance optimization when needed", "Implement custom hooks for reusable logic", "Utilize TypeScript's strict mode", ];

// Folder structure

const folderStructure = src/ components/ hooks/ pages/ types/ utils/ App.tsx index.tsx;

// Additional instructions

const additionalInstructions = `

  1. Use .tsx extension for files with JSX
  2. Implement strict TypeScript checks
  3. Utilize React.lazy and Suspense for code-splitting
  4. Use type inference where possible
  5. Implement error boundaries for robust error handling
  6. Follow React and TypeScript best practices and naming conventions
  7. Use ESLint with TypeScript and React plugins for code quality `;

Related rules

TypeScript, React, Next.js, and Cloudflare development patterns with Shadcn UI and DrizzleORM.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript + React + NextUI + Supabase integration guide for full-stack web applications.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript + shadcn/ui + Next.js development conventions with RSC-first patterns and Tailwind styling.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript, Vite, and Tailwind best practices with Vue 3 Composition API and DaisyUI.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript and Vue.js development conventions and best practices.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript, Zod, Tailwind, and Next.js coding standards for Cursor.

**/*
41k
via PatrickJS/awesome-cursorrules