useOrganization()
The useOrganization()
composable retrieves attributes of the currently active organization.
Returns
- Name
isLoaded
- Type
Ref<boolean>
- Description
A boolean that indicates whether Clerk has completed initialization. Initially
false
, becomestrue
once Clerk loads.
- Name
organization
- Type
Ref<Organization>
- Description
The currently active organization.
- Name
membership
- Type
Ref<OrganizationMembership>
- Description
The current organization membership.
How to use the useOrganization()
composable
Retrieve the current active organization
Use useOrganization()
to access the current active Organization
object.
Paginate organization memberships
The following example demonstrates how to use useOrganization()
to access the organization's memberships. Pagination is implemented by fetching pages of memberships when the "Previous page" or "Next page" buttons are clicked.
Feedback
Last updated on