Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.modelence.com/llms.txt

Use this file to discover all available pages before exploring further.

API Reference / modelence / client / useSession
useSession(): object
Defined in: packages/modelence/src/client/session.ts:130 useSession is a hook that returns the current user, and in the future will also return other details about the current session.

Example

import { useSession } from 'modelence/client';

function MyComponent() {
  const { user } = useSession();
  return <div>{user?.handle}</div>;
}

Returns

object
NameTypeDefined in
usernull | Userpackages/modelence/src/client/session.ts:132