React Router Framework 8
Last reviewed Sep 19, 2026
Prompt Details
Prompt Composition
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- React 1948 lines · 1.4K tokens
- TypeScript 746 lines · 1.5K tokens
- React Router Framework 871 lines · 3.5K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 116
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 306
- 312
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 384
- 426
- 434
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 552
- 565
- 601
- 602
- 613
- 614
- 639
- 647
- 653
- 732
- 770
- 778
- 807
- 829
- 838
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1275
- 1321
- 1333
Prompt Preview
Apply the Node.js 24, React 19, TypeScript 7, and JavaScript ES2026 prompts first. These rules cover React Router 8 Framework Mode and were checked against 8.3.1. Apply the RSC section only when using its experimental RSC integration.
Keep react-router and the installed @react-router/* framework packages on one version in the lockfile and upgrade them together. React Router supports its 8.x and 7.x majors with security fixes. It has shipped each fix as a new release at the head of the affected major rather than as a patch to an older minor, and it can publish the advisory up to about a month after that release, so keep these packages on the newest 8.x release, even when that means a new minor, rather than waiting for an audit finding. react-router 8.3.1 declares React and react-dom >=19.2.7 as peers, and its development package accepts Vite 7 or 8. Use Node.js 24; the framework's declared Node minimum is 22.22.0, and its support policy covers Active LTS and the latest minor of Maintenance LTS. TypeScript 7 is supported by the 8.3.1 development package.
Route authorization and middleware
- Authenticate before every protected
loaderandaction, either in covering ancestor servermiddlewareor in the handler, and enforce tenant and object permissions at each data access. A parent loader, layout, or hidden component is not an authorization boundary for child handlers. - Treat
clientLoader,clientAction, andclientMiddlewareas browser code. Protect their backend endpoints independently; browser checks beforeserverLoader()orserverAction()cannot