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 ruleP1project specificStack: react
routingssrnavigationthird-party-widgets
Force a full page load for links when SSR-injected widgets must re-initialize
When third-party or server-injected components (headers, footers, paywall widgets) only mount on a full document load, use a real navigation/full reload instead of client-side routing for those links.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetsx
| 1 | // Client-side nav skips re-injecting server-rendered widgets |
| 2 | <Link href={`/ticker/${name}/rapporter`}>View all</Link> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | // Full page load so server-injected components re-initialize |
| 2 | <Link href={`/ticker/${name}/rapporter`} useNextJsLink={false}>View all</Link> |
Explanation (EN)
Objašnjenje (HR)