Skip to content

Commit 540aa0e

Browse files
committed
docs: deprecate store.state.auth.user
1 parent ff1efd6 commit 540aa0e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/3.0-major-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ 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:
34+
If you depend on a reactive, logged-in user in your apps, here is how to fix the reactivity:
3535

3636
- Replace any reference to `store.state.auth.user` with `store.state.getters('auth/user')`.
3737

38-
That's it. :)
38+
Because the `user` state is no longer reactive, it is logical for it to be removed in the next version. It will likely be replaced by a `userId` attribute in Feathers-Vuex 4.0.
3939

4040

4141
### Server-Side Pagination Support is Off by Default

docs/auth-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ It includes the following state by default:
3030
userService: null, // Specify the userService to automatically populate the user upon login.
3131
entityIdField: 'userId', // The property in the payload storing the user id
3232
responseEntityField: 'user', // The property in the payload storing the user
33-
user: null, // automatically populates if you have correctly configured the three previous settings.
33+
user: null, // Deprecated: This is no longer reactive, so use the `user` getter. See below.
3434

3535
isAuthenticatePending: false,
3636
isLogoutPending: false,

0 commit comments

Comments
 (0)