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
encapsulationapi-designcomponents
Keep internal concerns internal; don't expose handlers you don't need to
If a component fully owns a behavior like pagination, keep fetching internal rather than forcing consumers to wire up handlers.
PR: hegnar-components · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codetsx
| 1 | <RepliesSection onPageChange={fetchPage} onPageSizeChange={fetchSize} /> // consumer must fetch |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | <RepliesSection /> // pagination + fetching handled internally |
Explanation (EN)
Objašnjenje (HR)