react redux typescript
via PatrickJS/awesome-cursorrules
React + Redux + TypeScript integration with hooks, Redux Toolkit, and type-safe patterns.
What is react redux typescript?
Establishes best practices for building React applications with Redux state management and TypeScript. Use this rule when setting up a new Redux-based React project or standardizing Redux patterns across a team.
- Enforces functional components with React hooks over class components
- Configures Redux Toolkit with slice pattern for organized state management
- Implements typed Redux hooks (useSelector, useDispatch) for component integration
- Provides folder structure separating components, features, store, types, and utils
- Recommends createAsyncThunk for async action handling with proper error management
- Enables Redux DevTools integration for debugging and time-travel inspection
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
// React + Redux + TypeScript .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// Use TypeScript for type safety
const useTypeScript = true;
// Redux best practices
const reduxBestPractices = [ "Use Redux Toolkit for efficient Redux development", "Implement slice pattern for organizing Redux code", "Utilize createAsyncThunk for handling async actions", "Use selectors for accessing state in components", ];
// Folder structure
const folderStructure = src/ components/ features/ store/ slices/ hooks.ts store.ts types/ utils/;
// Additional instructions
const additionalInstructions = `
- Use React.FC for functional components with props
- Implement strict TypeScript checks
- Use Redux hooks (useSelector, useDispatch) in components
- Create reusable typed hooks for Redux operations
- Implement proper error handling in async operations
- Use Redux DevTools for debugging
- Follow Redux style guide for naming conventions `;
Related rules
React Router v7 framework mode patterns for loaders, actions, route modules, and progressive enhancement.
React development with Styled Components integration and best practices.
Zero-loading-spinner React SPA with TanStack Router v1 + TanStack Query v5 for type-safe URLs and cache-first data.
Zero-loading-spinner routing with TanStack Router v1 and Query v5 for type-safe React SPAs
Expert guidance for React, TypeScript, Next.js 14, and Web3 stack development with Wagmi and Viem.
Full-stack React, TypeScript, and Symfony development assistant with Docker expertise.
