-
Notifications
You must be signed in to change notification settings - Fork 395
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
Changes from all commits
a9f4e42
c663369
ff8d49e
3a3a019
97c9969
9983fdd
9b6a2ea
af7dfb9
7f4f5bb
09429fb
eb23a65
549ac5b
71a732d
7e66dda
addd486
5ece591
46b332d
34bf263
30c38c5
b58e4ad
File filter
Filter by extension
Conversations
Jump to
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} | ||
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 ? 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
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 ? 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'; | ||
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 ? 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 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'; | ||
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 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(); | ||
|
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
1
mean ?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
useSignIn
hooks (one from the root and one from the legacyit adds the
-1` suffix. I don't know if this is controllable.