Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 469
feat(expo,react): Make Signal hooks the default#6946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a9f4e42c663369ff8d49e3a3a01997c99699983fdd9b6a2eaaf7dfb97f4f5bb09429fbeb23a65549ac5b71a732d7e66ddaaddd4865ece59146b332d34bf26330c38c5b58e4adFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -8,6 +8,7 @@ export default function RootLayout() { | ||
| <ClerkProvider | ||
| routerPush={(to: string) => router.push(to)} | ||
| routerReplace={to => router.replace(to)} | ||
| clerkJSUrl={process.env.EXPO_PUBLIC_CLERK_JS_URL} | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this updated on purpose ? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
| > | ||
| <ClerkLoaded> | ||
| <Stack> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,6 +19,10 @@ const getClerkExpoPath = () => { | ||
| return clerkExpoPath.replace('file:', ''); | ||
| } | ||
| if (clerkExpoPath?.startsWith('link:')) { | ||
| return clerkExpoPath.replace('link:', ''); | ||
| } | ||
Comment on lines
+22
to
+25
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 what does this unlock ? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for local testing. Locally the package.json has the | ||
| return undefined; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { useSignInSignal, useSignUpSignal } from '@clerk/react/experimental'; | ||
| export {}; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { useSignIn, useSignUp } from '@clerk/react'; | ||
| import { useSignIn, useSignUp } from '@clerk/react/legacy'; | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should dogfood the new hooks as much as we can before the release. Usually that's the strategy. | ||
| import type { OAuthStrategy, SetActive, SignInResource, SignUpResource } from '@clerk/types'; | ||
| import * as AuthSession from 'expo-auth-session'; | ||
| import * as WebBrowser from 'expo-web-browser'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { useSignIn, useSignUp } from '@clerk/react/legacy'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { useSignIn, useSignUp } from '@clerk/react/legacy'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { useSignIn, useSignUp } from '@clerk/react/legacy'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,7 +3,7 @@ | ||
| ```tsx {{ filename: 'app/sign-up/page.tsx' }} | ||
| 'use client'; | ||
| import { useSignUp } from '@clerk/nextjs'; | ||
| import { useSignUp } from '@clerk/nextjs/legacy'; | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we creating a new MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
| export default function SignUpPage() { | ||
| const { isLoaded, signUp } = useSignUp(); | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
1mean ?There was a problem hiding this comment.
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
useSignInhooks (one from the root and one from the legacyit adds the-1` suffix. I don't know if this is controllable.