Episode 2 — React Frontend Architecture NextJS / 2.11 — Routing and Application Structure
2.11.c — Dynamic routing & URL parameters
Learning outcomes
- Define dynamic segments with
:paramsyntax. - Read params with
useParamssafely. - Use search params when the UI state should be shareable as query string.
Dynamic segment
import { Route, Routes, useParams } from "react-router-dom";
export function AppRoutes() {
return (
<Routes>
<Route path="/users/:userId" element={<UserProfile />} />
</Routes>
);
}
function UserProfile() {
const { userId } = useParams();
return <h1>User {userId}</h1>;
}
Search params
import { useSearchParams } from "react-router-dom";
function Filters() {
const [params, setParams] = useSearchParams();
const q = params.get("q") ?? "";
return <input value={q} onChange={(e) => setParams({ q: e.target.value })} />;
}
Validation mindset
Params are strings from the URL—treat them as untrusted input and validate before fetching private data.
Appendix — Scenario bank (basic → advanced)
Drill format: broken URL / UX → root cause → fix → interview phrase.
RR2-001 — Dynamic routes #1
- Level: Beginner
- Symptom: 404 on refresh at depth
13or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-002 — Dynamic routes #2
- Level: Beginner+
- Symptom: 404 on refresh at depth
26or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-003 — Dynamic routes #3
- Level: Intermediate
- Symptom: 404 on refresh at depth
39or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-004 — Dynamic routes #4
- Level: Intermediate+
- Symptom: 404 on refresh at depth
52or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-005 — Dynamic routes #5
- Level: Advanced
- Symptom: 404 on refresh at depth
65or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-006 — Dynamic routes #6
- Level: Advanced+
- Symptom: 404 on refresh at depth
78or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-007 — Dynamic routes #7
- Level: Beginner
- Symptom: 404 on refresh at depth
91or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-008 — Dynamic routes #8
- Level: Beginner+
- Symptom: 404 on refresh at depth
104or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-009 — Dynamic routes #9
- Level: Intermediate
- Symptom: 404 on refresh at depth
117or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-010 — Dynamic routes #10
- Level: Intermediate+
- Symptom: 404 on refresh at depth
130or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-011 — Dynamic routes #11
- Level: Advanced
- Symptom: 404 on refresh at depth
143or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-012 — Dynamic routes #12
- Level: Advanced+
- Symptom: 404 on refresh at depth
156or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-013 — Dynamic routes #13
- Level: Beginner
- Symptom: 404 on refresh at depth
169or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-014 — Dynamic routes #14
- Level: Beginner+
- Symptom: 404 on refresh at depth
182or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-015 — Dynamic routes #15
- Level: Intermediate
- Symptom: 404 on refresh at depth
195or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-016 — Dynamic routes #16
- Level: Intermediate+
- Symptom: 404 on refresh at depth
8or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-017 — Dynamic routes #17
- Level: Advanced
- Symptom: 404 on refresh at depth
21or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-018 — Dynamic routes #18
- Level: Advanced+
- Symptom: 404 on refresh at depth
34or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-019 — Dynamic routes #19
- Level: Beginner
- Symptom: 404 on refresh at depth
47or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-020 — Dynamic routes #20
- Level: Beginner+
- Symptom: 404 on refresh at depth
60or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-021 — Dynamic routes #21
- Level: Intermediate
- Symptom: 404 on refresh at depth
73or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-022 — Dynamic routes #22
- Level: Intermediate+
- Symptom: 404 on refresh at depth
86or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-023 — Dynamic routes #23
- Level: Advanced
- Symptom: 404 on refresh at depth
99or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-024 — Dynamic routes #24
- Level: Advanced+
- Symptom: 404 on refresh at depth
112or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-025 — Dynamic routes #25
- Level: Beginner
- Symptom: 404 on refresh at depth
125or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-026 — Dynamic routes #26
- Level: Beginner+
- Symptom: 404 on refresh at depth
138or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-027 — Dynamic routes #27
- Level: Intermediate
- Symptom: 404 on refresh at depth
151or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-028 — Dynamic routes #28
- Level: Intermediate+
- Symptom: 404 on refresh at depth
164or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-029 — Dynamic routes #29
- Level: Advanced
- Symptom: 404 on refresh at depth
177or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-030 — Dynamic routes #30
- Level: Advanced+
- Symptom: 404 on refresh at depth
190or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-031 — Dynamic routes #31
- Level: Beginner
- Symptom: 404 on refresh at depth
3or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-032 — Dynamic routes #32
- Level: Beginner+
- Symptom: 404 on refresh at depth
16or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-033 — Dynamic routes #33
- Level: Intermediate
- Symptom: 404 on refresh at depth
29or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-034 — Dynamic routes #34
- Level: Intermediate+
- Symptom: 404 on refresh at depth
42or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-035 — Dynamic routes #35
- Level: Advanced
- Symptom: 404 on refresh at depth
55or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-036 — Dynamic routes #36
- Level: Advanced+
- Symptom: 404 on refresh at depth
68or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-037 — Dynamic routes #37
- Level: Beginner
- Symptom: 404 on refresh at depth
81or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-038 — Dynamic routes #38
- Level: Beginner+
- Symptom: 404 on refresh at depth
94or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-039 — Dynamic routes #39
- Level: Intermediate
- Symptom: 404 on refresh at depth
107or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-040 — Dynamic routes #40
- Level: Intermediate+
- Symptom: 404 on refresh at depth
120or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-041 — Dynamic routes #41
- Level: Advanced
- Symptom: 404 on refresh at depth
133or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-042 — Dynamic routes #42
- Level: Advanced+
- Symptom: 404 on refresh at depth
146or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-043 — Dynamic routes #43
- Level: Beginner
- Symptom: 404 on refresh at depth
159or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-044 — Dynamic routes #44
- Level: Beginner+
- Symptom: 404 on refresh at depth
172or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-045 — Dynamic routes #45
- Level: Intermediate
- Symptom: 404 on refresh at depth
185or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-046 — Dynamic routes #46
- Level: Intermediate+
- Symptom: 404 on refresh at depth
198or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-047 — Dynamic routes #47
- Level: Advanced
- Symptom: 404 on refresh at depth
11or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-048 — Dynamic routes #48
- Level: Advanced+
- Symptom: 404 on refresh at depth
24or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-049 — Dynamic routes #49
- Level: Beginner
- Symptom: 404 on refresh at depth
37or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-050 — Dynamic routes #50
- Level: Beginner+
- Symptom: 404 on refresh at depth
50or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-051 — Dynamic routes #51
- Level: Intermediate
- Symptom: 404 on refresh at depth
63or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-052 — Dynamic routes #52
- Level: Intermediate+
- Symptom: 404 on refresh at depth
76or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-053 — Dynamic routes #53
- Level: Advanced
- Symptom: 404 on refresh at depth
89or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-054 — Dynamic routes #54
- Level: Advanced+
- Symptom: 404 on refresh at depth
102or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-055 — Dynamic routes #55
- Level: Beginner
- Symptom: 404 on refresh at depth
115or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-056 — Dynamic routes #56
- Level: Beginner+
- Symptom: 404 on refresh at depth
128or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-057 — Dynamic routes #57
- Level: Intermediate
- Symptom: 404 on refresh at depth
141or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-058 — Dynamic routes #58
- Level: Intermediate+
- Symptom: 404 on refresh at depth
154or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-059 — Dynamic routes #59
- Level: Advanced
- Symptom: 404 on refresh at depth
167or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-060 — Dynamic routes #60
- Level: Advanced+
- Symptom: 404 on refresh at depth
180or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-061 — Dynamic routes #61
- Level: Beginner
- Symptom: 404 on refresh at depth
193or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-062 — Dynamic routes #62
- Level: Beginner+
- Symptom: 404 on refresh at depth
6or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-063 — Dynamic routes #63
- Level: Intermediate
- Symptom: 404 on refresh at depth
19or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-064 — Dynamic routes #64
- Level: Intermediate+
- Symptom: 404 on refresh at depth
32or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-065 — Dynamic routes #65
- Level: Advanced
- Symptom: 404 on refresh at depth
45or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-066 — Dynamic routes #66
- Level: Advanced+
- Symptom: 404 on refresh at depth
58or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-067 — Dynamic routes #67
- Level: Beginner
- Symptom: 404 on refresh at depth
71or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-068 — Dynamic routes #68
- Level: Beginner+
- Symptom: 404 on refresh at depth
84or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-069 — Dynamic routes #69
- Level: Intermediate
- Symptom: 404 on refresh at depth
97or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-070 — Dynamic routes #70
- Level: Intermediate+
- Symptom: 404 on refresh at depth
110or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-071 — Dynamic routes #71
- Level: Advanced
- Symptom: 404 on refresh at depth
123or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-072 — Dynamic routes #72
- Level: Advanced+
- Symptom: 404 on refresh at depth
136or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-073 — Dynamic routes #73
- Level: Beginner
- Symptom: 404 on refresh at depth
149or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-074 — Dynamic routes #74
- Level: Beginner+
- Symptom: 404 on refresh at depth
162or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-075 — Dynamic routes #75
- Level: Intermediate
- Symptom: 404 on refresh at depth
175or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-076 — Dynamic routes #76
- Level: Intermediate+
- Symptom: 404 on refresh at depth
188or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-077 — Dynamic routes #77
- Level: Advanced
- Symptom: 404 on refresh at depth
1or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-078 — Dynamic routes #78
- Level: Advanced+
- Symptom: 404 on refresh at depth
14or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-079 — Dynamic routes #79
- Level: Beginner
- Symptom: 404 on refresh at depth
27or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-080 — Dynamic routes #80
- Level: Beginner+
- Symptom: 404 on refresh at depth
40or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-081 — Dynamic routes #81
- Level: Intermediate
- Symptom: 404 on refresh at depth
53or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-082 — Dynamic routes #82
- Level: Intermediate+
- Symptom: 404 on refresh at depth
66or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-083 — Dynamic routes #83
- Level: Advanced
- Symptom: 404 on refresh at depth
79or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-084 — Dynamic routes #84
- Level: Advanced+
- Symptom: 404 on refresh at depth
92or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-085 — Dynamic routes #85
- Level: Beginner
- Symptom: 404 on refresh at depth
105or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-086 — Dynamic routes #86
- Level: Beginner+
- Symptom: 404 on refresh at depth
118or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-087 — Dynamic routes #87
- Level: Intermediate
- Symptom: 404 on refresh at depth
131or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-088 — Dynamic routes #88
- Level: Intermediate+
- Symptom: 404 on refresh at depth
144or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-089 — Dynamic routes #89
- Level: Advanced
- Symptom: 404 on refresh at depth
157or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-090 — Dynamic routes #90
- Level: Advanced+
- Symptom: 404 on refresh at depth
170or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-091 — Dynamic routes #91
- Level: Beginner
- Symptom: 404 on refresh at depth
183or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-092 — Dynamic routes #92
- Level: Beginner+
- Symptom: 404 on refresh at depth
196or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-093 — Dynamic routes #93
- Level: Intermediate
- Symptom: 404 on refresh at depth
9or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-094 — Dynamic routes #94
- Level: Intermediate+
- Symptom: 404 on refresh at depth
22or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-095 — Dynamic routes #95
- Level: Advanced
- Symptom: 404 on refresh at depth
35or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-096 — Dynamic routes #96
- Level: Advanced+
- Symptom: 404 on refresh at depth
48or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-097 — Dynamic routes #97
- Level: Beginner
- Symptom: 404 on refresh at depth
61or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-098 — Dynamic routes #98
- Level: Beginner+
- Symptom: 404 on refresh at depth
74or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-099 — Dynamic routes #99
- Level: Intermediate
- Symptom: 404 on refresh at depth
87or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-100 — Dynamic routes #100
- Level: Intermediate+
- Symptom: 404 on refresh at depth
100or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-101 — Dynamic routes #101
- Level: Advanced
- Symptom: 404 on refresh at depth
113or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-102 — Dynamic routes #102
- Level: Advanced+
- Symptom: 404 on refresh at depth
126or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-103 — Dynamic routes #103
- Level: Beginner
- Symptom: 404 on refresh at depth
139or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-104 — Dynamic routes #104
- Level: Beginner+
- Symptom: 404 on refresh at depth
152or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-105 — Dynamic routes #105
- Level: Intermediate
- Symptom: 404 on refresh at depth
165or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-106 — Dynamic routes #106
- Level: Intermediate+
- Symptom: 404 on refresh at depth
178or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-107 — Dynamic routes #107
- Level: Advanced
- Symptom: 404 on refresh at depth
191or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-108 — Dynamic routes #108
- Level: Advanced+
- Symptom: 404 on refresh at depth
4or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-109 — Dynamic routes #109
- Level: Beginner
- Symptom: 404 on refresh at depth
17or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-110 — Dynamic routes #110
- Level: Beginner+
- Symptom: 404 on refresh at depth
30or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-111 — Dynamic routes #111
- Level: Intermediate
- Symptom: 404 on refresh at depth
43or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-112 — Dynamic routes #112
- Level: Intermediate+
- Symptom: 404 on refresh at depth
56or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-113 — Dynamic routes #113
- Level: Advanced
- Symptom: 404 on refresh at depth
69or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-114 — Dynamic routes #114
- Level: Advanced+
- Symptom: 404 on refresh at depth
82or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-115 — Dynamic routes #115
- Level: Beginner
- Symptom: 404 on refresh at depth
95or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-116 — Dynamic routes #116
- Level: Beginner+
- Symptom: 404 on refresh at depth
108or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-117 — Dynamic routes #117
- Level: Intermediate
- Symptom: 404 on refresh at depth
121or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-118 — Dynamic routes #118
- Level: Intermediate+
- Symptom: 404 on refresh at depth
134or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-119 — Dynamic routes #119
- Level: Advanced
- Symptom: 404 on refresh at depth
147or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-120 — Dynamic routes #120
- Level: Advanced+
- Symptom: 404 on refresh at depth
160or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-121 — Dynamic routes #121
- Level: Beginner
- Symptom: 404 on refresh at depth
173or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-122 — Dynamic routes #122
- Level: Beginner+
- Symptom: 404 on refresh at depth
186or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-123 — Dynamic routes #123
- Level: Intermediate
- Symptom: 404 on refresh at depth
199or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-124 — Dynamic routes #124
- Level: Intermediate+
- Symptom: 404 on refresh at depth
12or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-125 — Dynamic routes #125
- Level: Advanced
- Symptom: 404 on refresh at depth
25or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-126 — Dynamic routes #126
- Level: Advanced+
- Symptom: 404 on refresh at depth
38or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-127 — Dynamic routes #127
- Level: Beginner
- Symptom: 404 on refresh at depth
51or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-128 — Dynamic routes #128
- Level: Beginner+
- Symptom: 404 on refresh at depth
64or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-129 — Dynamic routes #129
- Level: Intermediate
- Symptom: 404 on refresh at depth
77or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-130 — Dynamic routes #130
- Level: Intermediate+
- Symptom: 404 on refresh at depth
90or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-131 — Dynamic routes #131
- Level: Advanced
- Symptom: 404 on refresh at depth
103or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-132 — Dynamic routes #132
- Level: Advanced+
- Symptom: 404 on refresh at depth
116or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-133 — Dynamic routes #133
- Level: Beginner
- Symptom: 404 on refresh at depth
129or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-134 — Dynamic routes #134
- Level: Beginner+
- Symptom: 404 on refresh at depth
142or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-135 — Dynamic routes #135
- Level: Intermediate
- Symptom: 404 on refresh at depth
155or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-136 — Dynamic routes #136
- Level: Intermediate+
- Symptom: 404 on refresh at depth
168or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-137 — Dynamic routes #137
- Level: Advanced
- Symptom: 404 on refresh at depth
181or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-138 — Dynamic routes #138
- Level: Advanced+
- Symptom: 404 on refresh at depth
194or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-139 — Dynamic routes #139
- Level: Beginner
- Symptom: 404 on refresh at depth
7or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-140 — Dynamic routes #140
- Level: Beginner+
- Symptom: 404 on refresh at depth
20or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-141 — Dynamic routes #141
- Level: Intermediate
- Symptom: 404 on refresh at depth
33or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-142 — Dynamic routes #142
- Level: Intermediate+
- Symptom: 404 on refresh at depth
46or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-143 — Dynamic routes #143
- Level: Advanced
- Symptom: 404 on refresh at depth
59or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-144 — Dynamic routes #144
- Level: Advanced+
- Symptom: 404 on refresh at depth
72or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-145 — Dynamic routes #145
- Level: Beginner
- Symptom: 404 on refresh at depth
85or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-146 — Dynamic routes #146
- Level: Beginner+
- Symptom: 404 on refresh at depth
98or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-147 — Dynamic routes #147
- Level: Intermediate
- Symptom: 404 on refresh at depth
111or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-148 — Dynamic routes #148
- Level: Intermediate+
- Symptom: 404 on refresh at depth
124or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-149 — Dynamic routes #149
- Level: Advanced
- Symptom: 404 on refresh at depth
137or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-150 — Dynamic routes #150
- Level: Advanced+
- Symptom: 404 on refresh at depth
150or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-151 — Dynamic routes #151
- Level: Beginner
- Symptom: 404 on refresh at depth
163or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-152 — Dynamic routes #152
- Level: Beginner+
- Symptom: 404 on refresh at depth
176or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-153 — Dynamic routes #153
- Level: Intermediate
- Symptom: 404 on refresh at depth
189or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Loader not validating param causing empty UI after bad slug.
- Primary remediation: Validate + notFound pattern for unknown ids.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-154 — Dynamic routes #154
- Level: Intermediate+
- Symptom: 404 on refresh at depth
2or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Search params parsed manually without decoding edge cases.
- Primary remediation: Prefer explicit routes until you truly need splat.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-155 — Dynamic routes #155
- Level: Advanced
- Symptom: 404 on refresh at depth
15or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Optional param segment not modeled; empty string vs undefined confusion.
- Primary remediation: Use template helpers or encodeURIComponent for untrusted input.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-156 — Dynamic routes #156
- Level: Advanced+
- Symptom: 404 on refresh at depth
28or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: useParams returns strings; math breaks without Number().
- Primary remediation: Normalize types at boundary: zod parse params in loader or page.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-157 — Dynamic routes #157
- Level: Beginner
- Symptom: 404 on refresh at depth
41or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Link to dynamic route built with string concat XSS risk.
- Primary remediation: Model optional segments explicitly; redirect unknown slugs.
- Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.
RR2-158 — Dynamic routes #158
- Level: Beginner+
- Symptom: 404 on refresh at depth
54or wrong active nav highlight. - Structure symptom: duplicated layout or import cycles after refactor.
- Root cause class: Catch-all splat used when specific routes would be clearer.
- Primary remediation: Use
useSearchParamsorURLSearchParamswith care for encoding. - Verify: direct URL load, back/forward, deep link from email, mobile share sheet.
- Interview one-liner: Treat URL params as untrusted input: validate, then render.