React Router v6 deprecation/future flag warnings
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, react, typescript
- Ambito
- developer-experience, frontend
Direzione di ricerca
Start with shell/router/createRouter.tsx and check how its createBrowserRouter options are shared with the apps' test routers. Compare the two warnings and the behavior changes described in the issue with the converted apps before choosing whether to opt into flags, upgrade React Router, or filter warnings. Done means the chosen approach is consistent for the shell and affected app tests, with the warnings no longer appearing in the described setups.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What: react-router 6 prints its v7 future flag deprecation warnings for the shell's router, in the browser console of every frontend-base site in development and in the test output of every app that mounts a router. Deciding what to do about them belongs here, since the runtime router is the shell's.
Where it comes from: shell/router/createRouter.tsx calls createBrowserRouter(routes, { basename }) with no future option. react-router 6.26 and later (package.json pins ^6.26.1; apps install 6.30) warn once per router for each v7 flag that is not opted into:
⚠️ React Router Future Flag Warning: React Router will begin wrapping state updates in `React.startTransition` in v7. You can use the `v7_startTransition` future flag to opt-in early.
⚠️ React Router Future Flag Warning: Relative route resolution within Splat routes is changing in v7. You can use the `v7_relativeSplatPath` future flag to opt-in early.
Seen on 2026-10-21 in the dev console of an app's openedx dev site (the first message), and in every test file that renders a BrowserRouter or MemoryRouter (both messages; 58 of frontend-app-learning's 124 suites on master). The 6.30 runtime knows eight such flags (v7_startTransition, v7_relativeSplatPath, v7_partialHydration, v7_fetcherPersist, v7_normalizeFormMethod, v7_skipActionErrorRevalidation, v7_prependBasename, v7_throwAbortReason); the two above are the ones that warn in these setups.
Why it is not an app's fix: an app never creates the runtime router, and react-router offers no way to silence a deprecation other than opting into the flag it announces. Each flag is a behavior change for every app in the site (v7_startTransition wraps router state updates in React.startTransition; v7_relativeSplatPath changes how relative paths resolve inside splat routes), so opting in is a shell decision with an app-by-app check behind it. Upgrade guide: https://reactrouter.com/v6/upgrading/future.
Options
- Opt into the flags in
createRouter.tsx, one at a time, after checking the converted apps against each. Apps' test routers then set the same flags so tests run under the runtime's semantics. - Move to react-router 7, where the flags are the defaults and the warnings do not exist. Renovate's v7 PR (#47) was auto-closed; the migration is larger than the flags.
- Filter the two messages in the shell's development entry point until 1 or 2 happens.
[!NOTE]
This issue body was drafted by Claude (Claude Code) and reviewed before posting.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 13
- Merge medio
- 3g 5h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openedx/frontend-base
-
Export `SkipLink` componentAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
openedx/frontend-base#330 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
openedx/frontend-base#327 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openedx/frontend-base#210 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
openedx/frontend-base#350 ·
-
External routes ignore paramsForse già presa @arbrandes l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
openedx/frontend-base#349 · 1 assegnatario ·
Tutte le issue di openedx/frontend-base
Issue simili
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openclaw/openclaw#200365 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
effort: small good first issue priority: medium testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TMHSDigital/screencast-mcp#351 ·
I maintainer di solito rispondono entro 1 giorno
-
area-templates triage:bot-seen triage:needs-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/aspire#22356 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Archiving an agent that is not loaded keeps its old updatedAtForse già presa @luoph l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
content triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno