Is there a reason why the elements don't react to changes of their props?
See original GitHub issueIf the props of an vue-draggable-resizable change (e.g. x
, h
) change after the initial rendering of the object, the object is not rerendered. Hence, the changes are ignored. Probably this is due to the fact, that these props are only used in the created
and mounted
functions? Is there a special reason for that? I would like to be able to control the position of an element reactively based on the state of my app.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:25 (13 by maintainers)
Top Results From Across the Web
Is the reason props in React shouldn't be changed/mutated is ...
Setting props outside of React is dangerous and should be avoided. Why? The main reason is that it doesn't trigger re-renders.
Read more >Components and Props - React
Props are Read-Only Such functions are called “pure” because they do not attempt to change their inputs, and always return the same result...
Read more >The mystery of React Element, children, parents and re-renders
When MovingComponent re-renders because of its state change, its props stay the same. Therefore any Element (i.e. definition object) that ...
Read more >How to become a pro with React setState() in 10 minutes
It should also help mid to senior devs use cleaner and more ... If for some reason the prop passed into your component...
Read more >How to stop re-rendering lists in React? - Alex Sidorenko
React does not care whether “props changed” - it will render child ... If you don't want a component to re-render when its...
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 FreeTop 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
Top GitHub Comments
Bump!
Bump. Any word on this? Great library!
Edit: I noticed on the develop branch ‘active’ and ‘z’ are no longer watched. Why is this?