Answer the question
In order to leave comments, you need to log in
How to pass values from a state to a child component?
Hello.
I have a component with 2 inputs.
...
<input class="reg__label__input" type="email" disabled
:placeholder="$t('registrations.emailPlaceholder')"
v-model="$store.state.registrations.user_email">
...
<input class="reg__label__input" :type="passwdType" ref="passwdInput"
v-model="$store.state.registrations.password"
@input="eventPassInput($event)"
@blur="checkPlaceholder()">
...
v-model
it will always be different state
props
and computed
Answer the question
In order to leave comments, you need to log in
I tried in many ways <...> something is clearly wrong
user_email: {
get() {
return this.$store.state.registrations.user_email;
},
set(val) {
this.$store.commit('update_user_email', val);
},
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question