Source: Context7Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/websites/reactrouter.Use: Embed as “Research Brief” in PF-78 spec.
Execution status (2026-05-06)
- PF-78 migration is implemented on the main app branch.
- Runtime dependency is now
react-router-dom@^7.15.0(compatibility path). BrowserRouterno longer usesfutureflags insrc/App.tsx.- Test warning suppression for “React Router Future Flag Warning” was removed from
tests/setup.ts. - Deferred follow-up: optional mechanical import migration from
react-router-domtoreact-router.
Official upgrade path and prerequisites
- Minimum versions: node@20, react@18, react-dom@18. (Ref: Upgrading from v6.)
- No breaking changes if all v7 future flags are enabled before the version bump. Enable flags incrementally, commit (and optionally ship) after each step. (Ref: Migration Strategy.)
- This repo: Uses declarative routing (
BrowserRouter+Routes/Route), not data routers (createBrowserRouter/RouterProvider). Future flags are set onBrowserRouterinsrc/App.tsx.
Future flags relevant to this repo
| Flag | Purpose | Repo status |
|---|---|---|
v7_relativeSplatPath | Splat path behavior for relative routes | Enabled during v6 migration phase; no longer configured post-v7. |
v7_startTransition | Use React.useTransition for router state updates; can affect timing. | Enabled during v6 migration phase; no longer configured post-v7. |
v7_fetcherPersist | Fetcher lifecycle (idle-based). | For data routers only; N/A for current declarative setup. |
v7_skipActionErrorRevalidation | Action error revalidation. | For data routers only; N/A. |
v7_fetcherPersist, v7_normalizeFormMethod, v7_skipActionErrorRevalidation, etc.) apply only if the app later adopts RouterProvider/data APIs.
Confirmed migration strategy (Context7)
- Keep
v7_relativeSplatPath: trueas baseline. - Enable
v7_startTransition: trueon a branch; run route-heavy integration tests and smoke key flows (navigation, org slug routes, portal). (Completed in PF-78 execution.) - Update test wrappers so
MemoryRouter/BrowserRouterin tests align with future behavior; remove or adjust “React Router Future Flag Warning” suppression intests/setup.tsif appropriate. - Bump to
react-router-domv7 after all targeted flags are enabled and tests pass. (Completed in PF-78 execution using the v7 compatibility package.) - If moving to data routers later: Stage remaining v7 data-router flags in separate PRs.
Repo compatibility notes
- Router setup (post-migration):
src/App.tsx— declarativeBrowserRouterwithoutfutureprops on v7. - Splat usage: Root catch-all
path="/*"; org-slug subtree/o/:orgSlugwith childpath="*";SlugNestedContent.tsxusesuseParams<{ '*': string }>(). Most navigation uses absolute paths; relative splat risk is low withv7_relativeSplatPathalready on. - Sensitive areas:
src/routes/platform.tsx,src/routes/SlugNestedContent.tsx,src/platform/organizations/routing/OrgSlugRoute.tsx,src/platform/organizations/OrgSiteSwitcher.tsx,src/platform/navigation/components/SubModuleSidebar.tsx,src/platform/navigation/Breadcrumbs.tsx. - Tests:
tests/setup.tsno longer suppresses router future-flag warning;tests/integration/route-integrity.test.tsand route-heavy unit tests remain primary routing checks.
Recommended rollout and rollback
- Enable
v7_startTransition: trueinsrc/App.tsx; runnpm run validateandnpm run test:baseline; manual smoke of org-slug and catch-all routes. - Bump
react-router-domto ^7.x;npm install; fix any peer or type issues. - Validate full test suite and E2E smoke; adjust test setup if warnings or flakiness appear.
- Rollback: Revert to
react-router-dom^6.x and setv7_startTransition: false; re-run validate and tests.