Skip to content

Conversation

@nikospapcom
Copy link
Contributor

Description

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:

@nikospapcom nikospapcom self-assigned this Feb 13, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: af85574

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@clerk/clerk-react Patch
@clerk/chrome-extension Patch
@clerk/elements Patch
@clerk/clerk-expo Patch
@clerk/nextjs Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/tanstack-start Patch
@clerk/ui Patch

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

@vercel
Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 9:38am

@nikospapcom
Copy link
Contributor Author

!snapshot

@nikospapcom nikospapcom changed the title fix(clerk-react): Avoid re-render UserProfile when we pass userProfileProps and customMenuItems in <UserButton /> fix(clerk-react): Prevent UserProfile re-render in <UserButton /> with customMenuItems and userProfileProps Feb 13, 2025
@clerk-cookie
Copy link
Collaborator

Hey @nikospapcom - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.0.2-snapshot.v20250213120049
@clerk/astro 2.2.0-snapshot.v20250213120049
@clerk/backend 1.24.1-snapshot.v20250213120049
@clerk/chrome-extension 2.2.9-snapshot.v20250213120049
@clerk/clerk-js 5.52.3-snapshot.v20250213120049
@clerk/elements 0.22.22-snapshot.v20250213120049
@clerk/clerk-expo 2.7.7-snapshot.v20250213120049
@clerk/expo-passkeys 0.1.20-snapshot.v20250213120049
@clerk/express 1.3.48-snapshot.v20250213120049
@clerk/fastify 2.1.21-snapshot.v20250213120049
@clerk/localizations 3.10.6-snapshot.v20250213120049
@clerk/nextjs 6.11.3-snapshot.v20250213120049
@clerk/nuxt 1.1.4-snapshot.v20250213120049
@clerk/clerk-react 5.22.13-snapshot.v20250213120049
@clerk/react-router 1.0.8-snapshot.v20250213120049
@clerk/remix 4.4.24-snapshot.v20250213120049
@clerk/shared 2.21.1-snapshot.v20250213120049
@clerk/tanstack-start 0.9.6-snapshot.v20250213120049
@clerk/testing 1.4.22-snapshot.v20250213120049
@clerk/themes 2.2.18-snapshot.v20250213120049
@clerk/types 4.46.0-snapshot.v20250213120049
@clerk/ui 0.3.23-snapshot.v20250213120049
@clerk/upgrade 1.2.4-snapshot.v20250213120049
@clerk/vue 1.2.0-snapshot.v20250213120049

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/agent-toolkit@0.0.2-snapshot.v20250213120049 --save-exact

@clerk/astro

npm i @clerk/astro@2.2.0-snapshot.v20250213120049 --save-exact

@clerk/backend

npm i @clerk/backend@1.24.1-snapshot.v20250213120049 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@2.2.9-snapshot.v20250213120049 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.52.3-snapshot.v20250213120049 --save-exact

@clerk/elements

npm i @clerk/elements@0.22.22-snapshot.v20250213120049 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.7.7-snapshot.v20250213120049 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@0.1.20-snapshot.v20250213120049 --save-exact

@clerk/express

npm i @clerk/express@1.3.48-snapshot.v20250213120049 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.1.21-snapshot.v20250213120049 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.10.6-snapshot.v20250213120049 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.11.3-snapshot.v20250213120049 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@1.1.4-snapshot.v20250213120049 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.22.13-snapshot.v20250213120049 --save-exact

@clerk/react-router

npm i @clerk/react-router@1.0.8-snapshot.v20250213120049 --save-exact

@clerk/remix

npm i @clerk/remix@4.4.24-snapshot.v20250213120049 --save-exact

@clerk/shared

npm i @clerk/shared@2.21.1-snapshot.v20250213120049 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.9.6-snapshot.v20250213120049 --save-exact

@clerk/testing

npm i @clerk/testing@1.4.22-snapshot.v20250213120049 --save-exact

@clerk/themes

npm i @clerk/themes@2.2.18-snapshot.v20250213120049 --save-exact

@clerk/types

npm i @clerk/types@4.46.0-snapshot.v20250213120049 --save-exact

@clerk/ui

npm i @clerk/ui@0.3.23-snapshot.v20250213120049 --save-exact

@clerk/upgrade

npm i @clerk/upgrade@1.2.4-snapshot.v20250213120049 --save-exact

@clerk/vue

npm i @clerk/vue@1.2.0-snapshot.v20250213120049 --save-exact

@nikospapcom nikospapcom changed the title fix(clerk-react): Prevent UserProfile re-render in <UserButton /> with customMenuItems and userProfileProps fix(clerk-react): Prevent UserProfileModal re-render in <UserButton /> with custom props Feb 13, 2025
@nikospapcom
Copy link
Contributor Author

hey @aldenquimby, can you try the following version on @clerk/nextjs and tell if the issue has been resolved?

npm i @clerk/nextjs@6.11.3-snapshot.v20250213120049 --save-exact

@aldenquimby
Copy link

@nikospapcom that alone did not work, but after also running npm i @clerk/clerk-react@5.22.13-snapshot.v20250213120049 --save-exact then yes, all looks good!

@nikospapcom
Copy link
Contributor Author

@nikospapcom that alone did not work, but after also running npm i @clerk/clerk-react@5.22.13-snapshot.v20250213120049 --save-exact then yes, all looks good!

@aldenquimby this look like a problem with npm and dependencies, if you delete your package-lock.json and install only the @clerk/nextjs@6.11.3-snapshot.v20250213120049 the problem shouldn't exist

…leProps` and `customMenuItems` in `<UserButton />`
@nikospapcom nikospapcom force-pushed the nikospap/fix-user-profile-re-render-with-custom-menu-items-and-custom-userProfileProps branch from feee2c3 to af85574 Compare February 17, 2025 09:37
@nikospapcom nikospapcom marked this pull request as ready for review February 17, 2025 09:38
@nikospapcom nikospapcom merged commit 30f6f38 into main Feb 18, 2025
29 checks passed
@nikospapcom nikospapcom deleted the nikospap/fix-user-profile-re-render-with-custom-menu-items-and-custom-userProfileProps branch February 18, 2025 08:53
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.

6 participants