question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not support Vue 2.1.10 perfectly [Vue warn]: Avoid mutating a prop

See original GitHub issue

I use Vue 2.1.10,but get this error in GridItem.vue?2479:253:

[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: "isDraggable" 
(found in component <GridItem> at C:\projects\JBAY\vue-grid-layout\src\GridItem.vue)

please support this vue.js new feature up to date, thanks a lot

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
gmsacommented, Dec 27, 2017

Alright, will take a look at it whenever I have some time

2reactions
SergeyKhvalcommented, Dec 27, 2017

I have played with this issue a bit, but have a strange behavior. The grid starts to work correctly only after I manually update any prop on grid-layout e.g. is-draggable. Before that grid-items do not rerender properly, though it seems that model updates correctly

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Vue 2 - Mutating props vue-warn - Stack Overflow
I know that the problem is in created() when I overwrite the list prop, but I am a newbie in Vue, so I...
Read more >
Vue Error: Avoid Mutating a Prop Directly - Michael Thiessen
A simple pattern for fixing this issue; What this error means, and what causes it; Why mutating props is an anti-pattern; How to...
Read more >
Feb 28 2017 01:28 UTC - vuejs/vue - Gitter
Uncaught ReferenceError: Mycomponent is not defined ... [Vue warn]: Avoid mutating a prop directly since the value will be overwritten ...
Read more >
"Avoid mutating a prop directly" warning when updating prop
An warning is logged, complaining about changing a prop that isn't actually touched at all: [Vue warn]: Avoid mutating a prop directly since ......
Read more >
Avoid mutating props directly - Vue Forum
Now the problem is when I use this in another component try to show / hide modal it gives the following warning. Avoid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found