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
reacthookscouplingmaintainability
Split a hook that takes too many parameters
A hook accepting a long parameter list becomes tightly coupled and hard to maintain; split it into smaller hooks or move some logic to the parent.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | useCellarData(a, b, c, d, e, f, g, h); // too coupled |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | const data = useCellarData(); |
| 2 | const filters = useCellarFilters(); |
| 3 | // or let the parent own part of the logic |
Explanation (EN)
Objašnjenje (HR)