Skip to content

Conversation

dstaley
Copy link
Member

@dstaley dstaley commented Oct 8, 2025

Description

This PR moves our experimental useSignInSignal and useSignUpSignal hooks into their rightful place as the default useSignIn and useSignUp hooks. It moves the previous hooks to a @clerk/react/legacy export. It also updates Expo's use of the legacy hooks to the new export.

It adds the /legacy export to the Next.js, React Router, Tanstack Start, and Expo SDKs.

It also deletes the @clerk/remix package and all supporting files that referenced it.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: 34bf263

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

vercel bot commented Oct 8, 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 10, 2025 4:45pm

Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. 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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ds.feat/clerk-react-legacy-hooks

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

"react/use-session-list.mdx",
"react/use-session.mdx",
"react/use-sign-in-signal.mdx",
"react/use-sign-in-1.mdx",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that we control ? what does 1 mean ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for Typedoc. Since there are now two useSignIn hooks (one from the root and one from the legacyit adds the-1` suffix. I don't know if this is controllable.

<ClerkProvider
routerPush={(to: string) => router.push(to)}
routerReplace={to => router.replace(to)}
clerkJSUrl={process.env.EXPO_PUBLIC_CLERK_JS_URL}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this updated on purpose ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, previously the expo tests used the production version of clerk-js rather than the version from the current PR.

Comment on lines +24 to +29
// setPendingVerification(true);
// } catch (err: any) {
// // See https://clerk.com/docs/custom-flows/error-handling
// // for more info on error handling
// console.error(JSON.stringify(err, null, 2));
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

Comment on lines +22 to +25
if (clerkExpoPath?.startsWith('link:')) {
return clerkExpoPath.replace('link:', '');
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 what does this unlock ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for local testing. Locally the package.json has the link: protocol. However I'm unable to get the tests to work correctly locally 😓

@@ -1,4 +1,4 @@
import { useSignIn, useSignUp } from '@clerk/react';
import { useSignIn, useSignUp } from '@clerk/react/legacy';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just for this PR, or are we leasing the package like that ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of right now this is the intent. If we have time I'll take a look and see if we need to update the API of the useOAuth hook.

'use client';

import { useSignUp } from '@clerk/nextjs';
import { useSignUp } from '@clerk/nextjs/legacy';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we creating a new use-sign-up.md that wll use the new hook ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in our typedoc comments. Our new comments don't (yet) use this example, so I haven't created one yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants