0
Good guys, in my first component I have this obj ready.
export default {
data: () => ({
valid: false,
campo: {
endereco: '',
numero: '',
bairro: '',
cep: '',
cidade: '',
estado: '',
complemento: '',
}
}),
I’d like to take the field obj in other Formulars using vuex. my app.js store is like this
const store = new Vuex.Store({
state:{
global:{}
},
Mutations:{
setItem(state,obj){
state.global = obj;
}
}
});
My biggest difficulty is to pass this obj to the store and then discover the correct syntax to use in another component.
This syntax is to use in project 100% Vue.js right? ?
– Rafael
@Rafael, I left the example of how it could be done, so just you adapt to your needs. I don’t know how it works in Laravel.
– waghcwb