-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Feature Request] Allow Pathify-style commits in actions #79
Comments
OK, PoC working for root and modules here: Tasks:
|
would be great to have this released, as I was going in circles in google trying to keep my code simple yet my state nested. Seems like with Vuex you cannot have both. Pathify to the rescue! |
Hey @bkarlson - it's not a priority for me now (I have other things I want to spend my ODD dev time on) so don't hold your breath! |
Yeah, I also ended up here thinking that this would've been a really cool addition to the library. Shame you're no longer into Vuex anymore if I read it correctly. Classes are indeed easier for OO devs but I'm more of a functional programming type of person. Anyway, thanks again for this amazing library. It already saved me a lot of time and effort in writing pointless Maybe I'll just use your previous suggestion in another post: import store from '../index'
const actions = {
foo({commit}, value) {
store.set('page@status', value)
}
} |
This post is asking whether you can do Pathify style commits in actions, and the answer is currently no:
However, a quick monkey patch proves it might be possible to intercept the native commits and do something with them:
So with that in mind, it might be possible to detect
@
characters and do a Pathify styleset()
instead.Another option would be wrapping this in the existing commit helper, or even adding a helper to build and pass Payloads, like this demo
Payload
natively #80The text was updated successfully, but these errors were encountered: