0👍
✅
Have a look at https://vuejs.org/guide/built-ins/transition-group.html which is designed for this exact use case. Basically wrapping the whole v-for
block with <TransitionGroup>
and defining proper CSS classes is all you need to do, <TransitionGroup>
will take care of animating the element and removal from DOM after animation is done, you just need to add/remove items from state.
Source:stackexchange.com