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 type safety. Use this rule to ensure consistent use of functional components, Redux Toolkit, the slice pattern, and typed Redux hooks across your codebase.
- Enforce functional components with React hooks over class components
- Apply strict TypeScript type checking for type safety
- Implement Redux Toolkit and slice pattern for organized state management
- Use Redux hooks (useSelector, useDispatch) and create reusable typed hooks for Redux operations
- Handle async actions with createAsyncThunk and proper error handling
- Leverage Redux selectors and DevTools for state access and debugging
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
Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.
Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.
Android development with Jetpack Compose, clean architecture, and Material Design 3.
Angular development with Novo Elements UI library using standalone components.
Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.
Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.