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 ruleP2stack specificStack: react
reactpropsreadability
Prefer explicit named props over spreading a grab-bag object into a child
Spreading {...{a, b, c}} into a child is fine only when forwarding the whole parent props; otherwise list each prop explicitly for readability and so the reader sees exactly what the child receives.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejsx
| 1 | <SingleDay {...{ activeIndex, date, index, handleClick }} /> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejsx
| 1 | <SingleDay |
| 2 | activeIndex={activeIndex} |
| 3 | date={date} |
| 4 | index={index} |
| 5 | handleClick={handleClick} |
| 6 | /> |
Explanation (EN)
Objašnjenje (HR)