Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP1stack specificStack: react
reactkeysreserved-propsdata-modeling
Do not repurpose React's reserved key prop as a data field
key is reserved by React for reconciliation; store domain data under a differently named property.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | interface Filter { |
| 2 | key: string; // backend data field, but `key` is React-reserved |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | interface Filter { |
| 2 | filterId: string; |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)