Compare commits

...

2 Commits

Author SHA1 Message Date
Sid
e46da864e1 Update CODING_STANDARDS.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-26 14:56:14 +05:30
Sid
ac2d10a0e3 chore: add in more react standards 2026-03-26 11:53:39 +05:30

View File

@@ -75,6 +75,8 @@ Remember, these rules are here to make our codebase harmonious. If something doe
- Avoid: `import * as React from "react";` then `React.useCallback(...)`
- Add `data-testid` to testable elements for Playwright
- Co-locate utilities that are truly component-specific next to the component, otherwise place shared items under a common folder
- Avoid mixed controlled and uncontrolled state in React components. A component is either controlled or uncontrolled. State needs a single source of truth instead of being computed by props and then recomputed internally.
- SHOULD: Use derived state variables instead of adding unneeded `React.useState` / `useState` hooks.
## Readability and Abstractions