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
reactclean-codecallbacksnoop
Use a shared noop instead of inline empty arrow callbacks
Replace repeated inline () => {} handlers with a single shared noop reference to avoid recreating throwaway functions and to signal intent.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | <Dropdown onOpen={() => {}} /> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | import { noop } from 'lodash'; |
| 2 | <Dropdown onOpen={noop} /> |
Explanation (EN)
Objašnjenje (HR)