diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-04 16:19:49 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-04 16:19:49 +0900 |
| commit | 10fc1b4ea7a601e2195b21082dfc61dc3edfde09 (patch) | |
| tree | 02908c68c99adf6d9f0631b43b870bcd76c6d8f8 /mac/.cursor/rules/react.mdc | |
| parent | 2a1c3a2fa146299f7a0cc19a90ee7242fdb3b01d (diff) | |
modified aerospace/aerospace.toml, modified tmux/tmux.conf, created .cursor/
Diffstat (limited to 'mac/.cursor/rules/react.mdc')
| -rw-r--r-- | mac/.cursor/rules/react.mdc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mac/.cursor/rules/react.mdc b/mac/.cursor/rules/react.mdc new file mode 100644 index 0000000..b595c43 --- /dev/null +++ b/mac/.cursor/rules/react.mdc @@ -0,0 +1,16 @@ +--- +description: This rule explains React component patterns, hooks usage, and best practices. +globs: **/*.jsx,**/*.tsx +alwaysApply: false +--- + +# React rules + +- Use functional components with hooks instead of class components +- Use custom hooks for reusable logic +- Use the Context API for state management when needed +- Use proper prop validation with PropTypes +- Use React.memo for performance optimization when necessary +- Use fragments to avoid unnecessary DOM elements +- Use proper list rendering with keys +- Prefer composition over inheritance |
