Skip to content

Commit ff1efd6

Browse files
committed
docs more info about fixing broken user reactivity
1 parent 575717d commit ff1efd6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/3.0-major-release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ Due to changes in how reactivity is applied to service state (it's now using Vue
3131
- `user`: returns the reactive, logged-in user from the `userService` specified in the options.
3232
- `isAuthenticated`: a easy to remember boolean attribute for if the user is logged in.
3333

34+
If you depend on a reactive, logged-in user in your apps, here are the steps to fixing the reactivity:
35+
36+
- Replace any reference to `store.state.auth.user` with `store.state.getters('auth/user')`.
37+
38+
That's it. :)
39+
3440

3541
### Server-Side Pagination Support is Off by Default
3642

docs/auth-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ It includes the following state by default:
4444

4545
Two getters are available when a `userService` is provided to the `makeAuthPlugin` options.
4646

47-
- `user`: returns the reactive, logged-in user from the `userService` specified in the options.
47+
- `user`: returns the reactive, logged-in user from the `userService` specified in the options. Returns `null` if not logged in.
4848
- `isAuthenticated`: a easy to remember boolean attribute for if the user is logged in.
4949

5050
## Actions

0 commit comments

Comments
 (0)