Sep 13, 2022
0
Level 4
Passing form data but it is turning into full state when I am calling actions
My action is not receiving the correct payload that I am giving. Instead it is gicing my full state to the server
On template
data() {
return {
detailsForm: {
first_name: null,
middle_name: null,
last_name: null,
},
},
methods: {
submitBasicDetails() {
console.log(this.detailsForm)
store.dispatch('candidateProfile/basicDetails', this.detailsForm)
},
},
on vuex actions
export default {
profileImage: payload =>console.log(payload)
}
first output from template is:
{__ob__: Observer}
first_name: (...)
last_name: (...)
middle_name: (...)
...
which is ok but I know dont why actions is returning this output
{getters: {…}, state: {…}, rootGetters: {…}, dispatch: ƒ, commit: ƒ, …}
commit: ƒ (_type, _payload, _options)
dispatch: ƒ (_type, _payload, _options)
getters: {}
rootGetters : {}
rootState: {…}
state: {__ob__: Observer}
[[Prototype]]: Object
I don't know how it's possible
Please or to participate in this conversation.