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
reactpropsreadabilityexplicitness
List props explicitly instead of spreading an object into a component
Pass named props so a component's interface is visible at the call site, rather than spreading an opaque object that hides what it receives.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codejsx
| 1 | <ThreadRow {...thread} /> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejsx
| 1 | <ThreadRow id={thread.id} title={thread.title} author={thread.author} /> |
Explanation (EN)
Objašnjenje (HR)