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: Next.js / React Router
routinglinksnavigationspa
Use the framework's Link component for internal navigation
Use next/link or React Router's Link for in-app navigation instead of a raw <a>, to get client-side routing, base-path handling, and no hardcoded origins.
PR: hegnar-bellsheep-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | <a href="https://dev.example.com/page">Go</a> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | import Link from 'next/link'; |
| 2 | <Link href="/page">Go</Link> |
Explanation (EN)
Objašnjenje (HR)