-
Notifications
You must be signed in to change notification settings - Fork 282
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
feat: Add react-router SDK #4621
Conversation
🦋 Changeset detectedLatest commit: 12ddee6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: LekoArts <[email protected]>
!snapshot |
This comment was marked as outdated.
This comment was marked as outdated.
!snapshot |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Self-review with some TODO comments what I'll still tackle
@@ -28,4 +28,4 @@ jobs: | |||
- name: Validate Renovate Config | |||
env: | |||
RENOVATE_VERSION: 37.440.7 # Last version compatible with Node 18 | |||
run: pnpm dlx renovate@${{ env.RENOVATE_VERSION }} renovate-config-validator | |||
run: npx --yes --package renovate@${{ env.RENOVATE_VERSION }} renovate-config-validator |
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.
The previous version didn't work so I just reverted the pnpm change here
Omit<ReactRouterClerkProviderProps, 'routerPush' | 'routerReplace' | 'clerkState'> | ||
>; | ||
|
||
// TODO: Remove "any" on loaderData type |
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.
With some TS magic I think we can achieve that the Route.LoaderArgs
is passed through to our component, right?
@@ -634,6 +634,65 @@ | |||
], | |||
"semanticCommitScope": "eslint-config-custom" | |||
}, | |||
{ |
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.
Are these changes related to the react-router
SDK introduction ?
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.
The previous PRs adding these new packages forgot to update our renovate configuration, so when I did that now for react-router it added those missing ones. If I'd only add react-router our (non-blocking) CI check for Renovate would fail so I figured I just add the missing ones as I have to touch that file anyways.
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.
One minor comment around function naming & consistency.
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.
It looks good 🫡
Any expected timeline for when this will be merged? |
@phuctm97 You can expect this to be released this week |
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.
🔥 🚀
Description
Add
@clerk/react-router
package to support React Router v7 (https://remix.run/blog/react-router-v7).Fixes #4641
Architecture
Fundamentally the package was copied from
@clerk/remix
and then the migration steps were done. I've also switched from the HoC patternClerkApp(App)
to having the user put our<ClerkProvider>
into their app. This gives us more flexibility (and access toloaderData
) + it seems to be better for dealing with lazy loading with Suspense in Next.js (so maybe helps here, too).How to use:
See Docs PR: clerk/clerk-docs#1760
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change