useSession(): object
Defined in: packages/modelence/src/client/session.ts:262
useSession is a hook that returns the current user, and in the future will also return other details about the current session.
Example
Returns
object
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
useSession(): object
Defined in: packages/modelence/src/client/session.ts:262
useSession is a hook that returns the current user, and in the future will also return other details about the current session.
import { useSession } from 'modelence/client';
function MyComponent() {
const { user } = useSession();
return <div>{user?.handle}</div>;
}
object
| Name | Type | Defined in |
|---|---|---|
user | null | User | packages/modelence/src/client/session.ts:264 |