-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
WIP feat: access namespaced getters using the dot notation #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Conversation
Would love to see this merged. It also closes #679. I implemented dotted getters in a patch I posted there before I knew about this! |
Any chance the slashed getters could be removed entirely in favor of just the nested structure? It would be a breaking change I guess, but it looks way nicer in the debugger to not have both of them. I've implemented it that way here. |
@chearon I don't think dropping the slashed getters is a good idea. It is a breaking change and I am sure many people prefer that syntax over the dot notation. It's more likely that we introduce slashed state to provide a consistent API among Vuex assets. |
Any updates on this PR? |
@hootlex Would it be nice to discuss on dropping the slash getters for vue 3.0 in the rfc? This could avoid confusion later on such that the getters are more consistent with the others for namespacing. |
WRT removing slashed getters, as I mentioned in this issue, what'd be wrong with just deprecating them? So, if you were to write I think adding slashed state too is a bad idea, |
Is there any plan to merge this PR, or any alternative solution to fix this? |
Hello everyone, my dear friend Vasily really wants this feature to be merged, resolve ASAP |
It's been nearly a year since this PR was made and it hasn't even been discussed by a single member of the Vuex team let alone merged. 😦 |
I agree with everyone who says that without dot notation it is difficult to read. It seems that work is already done, but why is it not merged? 😦 |
Any updates on this being merged, @hootlex? |
+1 This would be a really nice feature |
I'd also like for this to be merged. |
Would love to see this merged. Happy to edit/write documentation if that would help. |
I would also love to see this make it in, especially after about the 1000th time of forgetting and just instinctively writing in dot, just to have to go back and fix it all again after the wall of errors. |
Adding to this in hopes it will get revisited and merged! |
Add's support for accessing namespaced getters using the dot notation, the same way we do for the
state
. For example:this.$store.getters.users.newUsers
Implements #1258
Todo: