Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

release-next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on release-next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

react-router@7.10.0-pre.0

Minor Changes

  • Stabilize fetcher.reset() (#14545)

    • ⚠️ This is a breaking change if you have begun using fetcher.unstable_reset()
  • Stabilize the dataStrategy match.shouldRevalidateArgs/match.shouldCallHandler() APIs. (#14592)

    • The match.shouldLoad API is now marked deprecated in favor of these more powerful alternatives

    • If you're using this API in a custom dataStrategy today, you can swap to the new API at your convenience:

      // Before
      const matchesToLoad = matches.filter((m) => m.shouldLoad);
      
      // After
      const matchesToLoad = matches.filter((m) => m.shouldCallHandler());
    • match.shouldRevalidateArgs is the argument that will be passed to the route shouldRevaliate function

    • Combined with the parameter accepted by match.shouldCallHandler, you can define a custom revalidation behavior for your dataStrategy:

    const matchesToLoad = matches.filter((m) => {
      const defaultShouldRevalidate = customRevalidationBehavior(
        match.shouldRevalidateArgs,
      );
      return m.shouldCallHandler(defaultShouldRevalidate);
      // The argument here will override the internal `defaultShouldRevalidate` value
    });

Patch Changes

  • Fix a Framework Mode bug where the defaultShouldRevalidate parameter to shouldRevalidate would not be correct after action returned a 4xx/5xx response (true when it should have been false) (#14592)

    • If your shouldRevalidate function relied on that parameter, you may have seen unintended revalidations
  • Fix fetcher.submit failing with plain objects containing a tagName property (#14534)

  • [UNSTABLE] Add unstable_pattern to the parameters for client side unstable_onError, refactor how it's called by RouterProvider to avoid potential strict mode issues (#14573)

  • Add new unstable_useTransitions flag to routers to give users control over the usage of React.startTransition and React.useOptimistic. (#14524)

    • Framework Mode + Data Mode:
      • <HydratedRouter unstable_transition>/<RouterProvider unstable_transition>
      • When left unset (current default behavior)
        • Router state updates are wrapped in React.startTransition
        • ⚠️ This can lead to buggy behaviors if you are wrapping your own navigations/fetchers in React.startTransition
        • You should set the flag to true if you run into this scenario to get the enhanced useOptimistic behavior (requires React 19)
      • When set to true
        • Router state updates remain wrapped in React.startTransition (as they are without the flag)
        • Link/Form navigations will be wrapped in React.startTransition
        • A subset of router state info will be surfaced to the UI during navigations via React.useOptimistic (i.e., useNavigation(), useFetchers(), etc.)
          • ⚠️ This is a React 19 API so you must also be React 19 to opt into this flag for Framework/Data Mode
      • When set to false
        • The router will not leverage React.startTransition or React.useOptimistic on any navigations or state changes
    • Declarative Mode
      • <BrowserRouter unstable_useTransitions>
      • When left unset
        • Router state updates are wrapped in React.startTransition
      • When set to true
        • Router state updates remain wrapped in React.startTransition (as they are without the flag)
        • Link/Form navigations will be wrapped in React.startTransition
      • When set to false
        • the router will not leverage React.startTransition on any navigations or state changes
  • Fix the promise returned from useNavigate in Framework/Data Mode so that it properly tracks the duration of popstate navigations (i.e., navigate(-1)) (#14524)

  • Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled (#14577)

  • Preserve statusText on the ErrorResponse instance when throwing data() from a route handler (#14555)

  • Optimize href() to avoid backtracking regex on splat (#14329)

@react-router/dev@7.10.0-pre.0

Minor Changes

  • Stabilize future.v8_splitRouteModules, replacing future.unstable_splitRouteModules (#14595)

    • ⚠️ This is a breaking change if you have begun using future.unstable_splitRouteModules. Please update your react-router.config.ts.
  • Stabilize future.v8_viteEnvironmentApi, replacing future.unstable_viteEnvironmentApi (#14595)

    • ⚠️ This is a breaking change if you have begun using future.unstable_viteEnvironmentApi. Please update your react-router.config.ts.

Patch Changes

  • Load environment variables before evaluating routes.ts (#14446)

    For example, you can now compute your routes based on VITE_-prefixed environment variables:

    # .env
    VITE_ENV_ROUTE=my-route
    // app/routes.ts
    import { type RouteConfig, route } from "@react-router/dev/routes";
    
    const routes: RouteConfig = [];
    if (import.meta.env.VITE_ENV_ROUTE === "my-route") {
      routes.push(route("my-route", "routes/my-route.tsx"));
    }
    
    export default routes;
  • Updated dependencies:

    • react-router@7.10.0-pre.0
    • @react-router/node@7.10.0-pre.0
    • @react-router/serve@7.10.0-pre.0

@react-router/architect@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0
    • @react-router/node@7.10.0-pre.0

@react-router/cloudflare@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0

react-router-dom@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0

@react-router/express@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0
    • @react-router/node@7.10.0-pre.0

@react-router/fs-routes@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • @react-router/dev@7.10.0-pre.0

@react-router/node@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0

@react-router/remix-routes-option-adapter@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • @react-router/dev@7.10.0-pre.0

@react-router/serve@7.10.0-pre.0

Patch Changes

  • Updated dependencies:
    • react-router@7.10.0-pre.0
    • @react-router/node@7.10.0-pre.0
    • @react-router/express@7.10.0-pre.0

create-react-router@7.10.0-pre.0

@brophdawg11 brophdawg11 merged commit d037c11 into release-next Nov 25, 2025
1 check passed
@brophdawg11 brophdawg11 deleted the changeset-release/release-next branch November 25, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants