Skip to content

react-query-firebase / useAuthStateReady

Function: useAuthStateReady() ​

ts
function useAuthStateReady(): boolean;

Defined in: src/web/auth/useAuthStateReady.ts:20

A custom hook that determines if the Firebase authentication state is ready. It uses Firebase authentication to check if the auth state is ready and updates the state accordingly.

Returns ​

boolean

Example ​

jsx
export const MyComponent = () => {
 const isAuthStateReady = useAuthStateReady();
 console.log(isAuthStateReady);
};

Released under the MIT License.