Files
Anthias/.cursor/rules/react.mdc
2025-06-08 10:55:48 -07:00

16 lines
549 B
Plaintext

---
description:
globs:
alwaysApply: true
---
# React
- Make use of functional components instead of class-based components.
- Use `useState` for managing state instead of `this.state`.
- Use `useEffect` for managing side effects instead of `componentDidMount`,
`componentDidUpdate`, and `componentWillUnmount`.
- Do not explicitly import React from `react`, as it is already being taken care
of by the `new webpack.ProvidePlugin({ React: 'react' })` plugin in
`webpack.common.js`.
- Avoid props drilling by using Redux for state management.