Skip to content

In nextjs/app-beta, the UserButton doesn't seem to work with Suspense? #1142

Open
@kleemeo

Description

@kleemeo

Trying to use the UserButton component in a next 13 server component. I understand there's some time needed to fetch the data from the user via Clerk's api and retrieve the image.

I was wondering why this component/pattern doesn't adhere to the <Suspense /> loading pattern. (Loading UI doesn't show before the component/image is ready)

I've attached a gif of what it's kind of doing, and it does the same even when wrapped with:

  <Suspense fallback={<p>loading...</p>}>
      <UserButton />
  </Suspense>

delay

Am I doing something wrong here or is the implementation of UserButton just doesn't really allow the effects of Suspense as it loads? Sorry if I'm missing something here. Still new to app-router and the clerk app-beta.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    prioritizedThis issue has been triaged and the team is working on it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions