Skip to content

Commit

Permalink
docs: grammar (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheriffderek authored Oct 17, 2023
1 parent a9ab469 commit c4deaee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const user = useCurrentUser()

### Wait for the user to be loaded

The `useCurrentUser()` composable will give you an `undefined` value until the user is loaded. It will then become `null` or the user object itself. If you need to wait for the user to be loaded in a declarative fashion, you can use the `useIsCurrentUserLoaded()` composable. Internally it's just a computed property that returns `true` when if user is not `undefined`.
The `useCurrentUser()` composable will give you an `undefined` value until the user is loaded. It will then become `null` or the user object itself. If you need to wait for the user to be loaded in a declarative fashion, you can use the `useIsCurrentUserLoaded()` composable. Internally it's just a computed property that returns `true` when the user is not `undefined`.

There is also a `getCurrentUser()` function that returns a promise of the current user. This is useful if you want to wait for the user to be loaded before doing anything. You can, for example, await it within a navigation guard:

Expand Down

0 comments on commit c4deaee

Please sign in to comment.