-
Notifications
You must be signed in to change notification settings - Fork 259
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
fix(shared, nextjs): Support importing @clerk/shared in @clerk/nextjs #1767
Conversation
🦋 Changeset detectedLatest commit: 921892f The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
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.
Do wee need to test this with snapshots ? Or should we be good as long this builds ? I remember someone mentioned a runtime error that is why i am asking.
Sorry didn't mean to approve, just to add a comment. |
@panteliselef do know mean this runtime error ?: #1760 (comment) |
yes, that one |
8c7279f
to
a7c2274
Compare
b9df973
to
39a24a0
Compare
This change will resolve the following issue we had when importing @clerk/shared in @clerk/nextjs: ``` Your're importing a component that needs useState. It only works in a Client Component none of its parents are marked with "use client", so they're Server Components by default. [javascript/packages/shared/src/hooks/usePagesOrInfinite.js:1:1] import { useCallback, useMemo, useRef, useState } from "react"; ```
39a24a0
to
5864bc7
Compare
…variable deprecation
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Review it per commit
Use
use client
directive in @clerk/shared to support importing it in libraries compatible with RSC and use package in @clerk/nextjs (also replaced current copy/pasted code).Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
@clerk/chrome-extension
gatsby-plugin-clerk
build/tooling/chore