Do not support Vue 2.1.10 perfectly [Vue warn]: Avoid mutating a prop
See original GitHub issueI 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:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Alright, will take a look at it whenever I have some time
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