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
reactarchitecturecontainer-presentationalstate
Keep presentational components dummy; lift logic to the container
Avoid leaking control logic into leaf components — having them just render from props (and routing logic through the parent) prevents subtle state-coupling bugs.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | // item onClick flips a shared visibility flag that other parts read |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | // item is dummy; parent owns visibility and passes it down explicitly |
Explanation (EN)
Objašnjenje (HR)