Back to Clerk

Replace `signOutCallback` prop on `SignOutButton` with `redirectUrl`

packages/upgrade/src/versions/core-2/common/signoutcallback-to-redirecturl.md

latest518 B
Original Source

The signOutCallback prop on the <SignOutButton /> component has been removed. Instead, you can use the redirectUrl prop. Example below:

diff
  import { SignOutButton } from "@clerk/clerk-react";

  export const Signout = () => {
    return (
      <SignOutButton
-       signOutCallback={() => { window.location.href = "/your-path" }}
+       redirectUrl="/your-path"
      >
        <button>Sign Out</button>
      </SignOutButton>
    )
  }