Skip to content
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

Avoid mutating a prop #12

Open
jillztom opened this issue Sep 21, 2017 · 1 comment
Open

Avoid mutating a prop #12

jillztom opened this issue Sep 21, 2017 · 1 comment

Comments

@jillztom
Copy link

jillztom commented Sep 21, 2017

I'm getting the following error:

vue.esm.js?65d7:476 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"

found in

---> at node_modules/vue-switch/switch.vue

The slider is working, but the v-model value is not changing.

@AndreKR
Copy link

AndreKR commented May 17, 2018

If you're binding to a prop, unfortunately (that's a Vue issue) you have to use <switches :value="value" @input="doSomething"> instead of v-model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants