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 ruleP2universalStack: react
api-designpropsnaming
Avoid two props that mean the same thing
Don't expose two callbacks/props with overlapping meaning (e.g. onSubmit and onAfterSubmit); collapse to one clear prop.
PR: vinify-frontend · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codetsx
| 1 | interface DialogProps { |
| 2 | onSubmit: () => void; |
| 3 | onAfterSubmit: () => void; // same meaning, confusing |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | interface DialogProps { |
| 2 | onSubmit: () => void; |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)