Skip to main content
import { useStytchMember } from '@stytch/react/b2b';

export const Home = () => {
  const { member } = useStytchMember();

  return member ? <p>Welcome, {member.name}</p> : <p>Log in to continue!</p>;
};
{
  "member": { ... },
  "isInitialized": true,
  "fromCache": false
}
To get the currently signed in , use the useStytchMember hook. If the user is not signed in, the member object will be null. In non-React environments, use the self.getSync method to get the Member.

Return Value

member
object | null
The current Member.
fromCache
boolean
Whether the Session data is from persistent storage.