The Clerk object contains the following properties:
client
Client
This object contains a list of Sessions tied to the client, and utilities to Sign In or Sign Up to create an additional Session.
user
User | null | undefined
This field is a shortcut to session.user. Ifsession is null or undefined, this field will match.
session
Session | null | undefined
This field contains the currently active Session, which is guaranteed to be one of the Session's in client.sessions. If there is no active Session, this field will be null. If the Session is loading, this field will be undefined.
Changes session to the passed Session, Session ID, or null.
The change happens in three steps:
session is updated to undefined - the same state that is used while Clerk is loading. This causes the control components to stop rendering their children.
beforeEmit is run. If a promise is returned, Clerk waits for the promise to resolve.
session is updated to the new value. This causes the control components to render their children again.