React Router Framework 7
Last reviewed Sep 20, 2026
Prompt Details
Prompt Composition
5prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- React 1948 lines · 1.4K tokens
- TypeScript 5.940 lines · 1.2K tokens
- React Router Framework 775 lines · 3.3K tokens
Total366 lines · 14.3K 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 5.9, and JavaScript ES2026 prompts first. These rules cover React Router 7 Framework Mode and were checked against 7.18.3. The final section covers differences when opting into its unstable RSC integration.
Version scope and runtime baseline
- Keep
react-router, any retainedreact-router-domre-export, and the deployed@react-router/*packages on one identical release and move them together:react-router-dom,@react-router/node,@react-router/express, and@react-router/serveeach declare the matchingreact-routerrelease exactly.react-routerand the@react-router/*packages publish v7 releases under npm'sversion-7dist-tag, while theirlatestpoints at v8. Never downgrade these packages to get an install through. - Deploy on the included supported Node.js 24 and patched React 19 baselines. The package ranges of Node
>=20and React/React DOM>=18are compatibility minima, not permission to use an end-of-life runtime. React Router v7 still receives security fixes; v6 does not.
Route authorization and mutations
- Authenticate every protected server
loaderandaction, either in the handler or in server middleware covering every request to it; authorize its specific tenant and object before reading or mutating data selected byparamsor form fields. - Do not use a parent
loaderredirect as a guard for child handlers: loaders can execute concurrently, and direct.data?_routes=...requests can select a subset. Nesting and hidden route components do not enforce access control. - Protect