From e46da864e18b0ddbce6ecd300c26696a3f9633fd Mon Sep 17 00:00:00 2001 From: Sid Date: Thu, 26 Mar 2026 14:56:14 +0530 Subject: [PATCH] Update CODING_STANDARDS.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CODING_STANDARDS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index 202840da6..478fdd193 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -75,8 +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. The component is either controlled or un-controlled, state needs to have one source of truth instead of being computed by props and then re-computed internally. -- SHOULD: use derived state variables instead of adding un-needed `React.useState` / `useState` hooks. +- 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