Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
**文件来源:** PatrickJS/awesome-cursorrules → `rules/react-redux-typescript-cursorrules-prompt-file.mdc`
**原仓库:** https://github.com/PatrickJS/awesome-cursorrules
**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)
把 `react-redux-typescript-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for React development with Redux and TypeScript integration.
globs: **/*
alwaysApply: false
---
// 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 = `
1. Use React.FC for functional components with props
2. Implement strict TypeScript checks
3. Use Redux hooks (useSelector, useDispatch) in components
4. Create reusable typed hooks for Redux operations
5. Implement proper error handling in async operations
6. Use Redux DevTools for debugging
7. Follow Redux style guide for naming conventions
`;
有问题或建议,在本 skill 下留言。
把 `react-redux-typescript-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for React development with Redux and TypeScript integration.