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 ruleP2project specificStack: react
muilayoutsemanticscomponent-usage
Use layout components only for actual layout
Reserve flex/grid layout components for flexible containers; for a plain non-layout wrapper use a basic element instead.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | const EditedPost = () => ( |
| 2 | <Grid className={styles.container}> |
| 3 | <Typography>Edited</Typography> |
| 4 | </Grid> |
| 5 | ); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | const EditedPost = () => ( |
| 2 | <Box className={styles.container}> |
| 3 | <Typography>Edited</Typography> |
| 4 | </Box> |
| 5 | ); |
Explanation (EN)
Objašnjenje (HR)