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 ruleP2stack specificStack: react
htmlsemanticsbuttonssimplicity
Prefer a native button over a heavy UI-library button for simple cases
Use a plain semantic HTML button for simple interactive elements rather than pulling in a component-library button that adds weight and styling overhead you don't need.
PR: hegnar-forum-web · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codetsx
| 1 | <Button onClick={onVote}>Vote</Button> // MUI Button |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | <button type="button" onClick={onVote}>Vote</button> |
Explanation (EN)
Objašnjenje (HR)