Skip to main content

useUser

Fetches the signed-in user’s profile. Cached for five minutes and retried once.
boolean
default:"true"
Pass isReady && !!token so the request waits for credentials.
Query key: ['user', 'profile'].

useUpdateProfile

A mutation that saves profile fields and updates the cached profile with the server’s answer.

useUserStore

Both hooks also write the profile into a small persisted zustand store, which you can read anywhere without a query:
The store persists to localStorage under cskn-user-storage. Call useUserStore.getState().logout() to clear it.