Skip to content

react-query-firebase / auth / useCurrentUser

Function: useCurrentUser()

ts
function useCurrentUser(): null | User

Defined in: src/auth/useCurrentUser.ts:9

Hook that provides the current authenticated user from Firebase Auth. It listens for changes in the authentication state and updates the user accordingly.

Returns

null | User

The current authenticated user object or null if no user is authenticated.

Released under the MIT License.