Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 12, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router (source) 7.9.3 -> 7.9.4 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

remix-run/react-router (react-router)

v7.9.4

Compare Source

Patch Changes
  • handle external redirects in from server actions (#​14400)

  • New (unstable) useRoute hook for accessing data from specific routes (#​14407)

    For example, let's say you have an admin route somewhere in your app and you want any child routes of admin to all have access to the loaderData and actionData from admin.

    // app/routes/admin.tsx
    import { Outlet } from "react-router";
    
    export const loader = () => ({ message: "Hello, loader!" });
    
    export const action = () => ({ count: 1 });
    
    export default function Component() {
      return (
        <div>
          {/* ... */}
          <Outlet />
          {/* ... */}
        </div>
      );
    }

    You might even want to create a reusable widget that all of the routes nested under admin could use:

    import { unstable_useRoute as useRoute } from "react-router";
    
    export function AdminWidget() {
      // How to get `message` and `count` from `admin` route?
    }

    In framework mode, useRoute knows all your app's routes and gives you TS errors when invalid route IDs are passed in:

    export function AdminWidget() {
      const admin = useRoute("routes/dmin");
      //                      ^^^^^^^^^^^
    }

    useRoute returns undefined if the route is not part of the current page:

    export function AdminWidget() {
      const admin = useRoute("routes/admin");
      if (!admin) {
        throw new Error(`AdminWidget used outside of "routes/admin"`);
      }
    }

    Note: the root route is the exception since it is guaranteed to be part of the current page.
    As a result, useRoute never returns undefined for root.

    loaderData and actionData are marked as optional since they could be accessed before the action is triggered or after the loader threw an error:

    export function AdminWidget() {
      const admin = useRoute("routes/admin");
      if (!admin) {
        throw new Error(`AdminWidget used outside of "routes/admin"`);
      }
      const { loaderData, actionData } = admin;
      console.log(loaderData);
      //          ^? { message: string } | undefined
      console.log(actionData);
      //          ^? { count: number } | undefined
    }

    If instead of a specific route, you wanted access to the current route's loaderData and actionData, you can call useRoute without arguments:

    export function AdminWidget() {
      const currentRoute = useRoute();
      currentRoute.loaderData;
      currentRoute.actionData;
    }

    This usage is equivalent to calling useLoaderData and useActionData, but consolidates all route data access into one hook: useRoute.

    Note: when calling useRoute() (without a route ID), TS has no way to know which route is the current route.
    As a result, loaderData and actionData are typed as unknown.
    If you want more type-safety, you can either narrow the type yourself with something like zod or you can refactor your app to pass down typed props to your AdminWidget:

    export function AdminWidget({
      message,
      count,
    }: {
      message: string;
      count: number;
    }) {
      /* ... */
    }

Configuration

📅 Schedule: Branch creation - "before 7am on the first day of the week" in timezone GMT, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 12, 2025
@renovate renovate bot enabled auto-merge (squash) October 12, 2025 01:17
Copy link

vercel bot commented Oct 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Skipped Skipped Oct 12, 2025 1:17am

Copy link

changeset-bot bot commented Oct 12, 2025

⚠️ No Changeset found

Latest commit: 435c407

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

pkg-pr-new bot commented Oct 12, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6969

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6969

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6969

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6969

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6969

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6969

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6969

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6969

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6969

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6969

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6969

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6969

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6969

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6969

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6969

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6969

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6969

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6969

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6969

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6969

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6969

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6969

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6969

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6969

commit: 435c407

@renovate renovate bot merged commit 2e277e7 into main Oct 13, 2025
64 of 69 checks passed
@renovate renovate bot deleted the renovate/react-router-dev-minor branch October 13, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file react-router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants