Recall & Review
beginner
What is
<TransitionGroup> used for in Vue?<TransitionGroup> is used to animate list items when they are added, removed, or moved in a list.
Click to reveal answer
beginner
How do you specify the HTML tag that
<TransitionGroup> renders as?Use the tag attribute, for example: <TransitionGroup tag="ul"> to render as an unordered list.
Click to reveal answer
beginner
Why must each item inside a
<TransitionGroup> have a unique key?Vue uses the key to track each item and apply the correct animation when items change.
Click to reveal answer
intermediate
What CSS classes does Vue automatically add during
<TransitionGroup> animations?Vue adds classes like v-enter-from, v-enter-active, v-leave-from, v-leave-active, and v-move to control animation stages.
Click to reveal answer
intermediate
How can you animate list item moves inside
<TransitionGroup>?<p>Use the <code>move</code> CSS class with <code>transition</code> or <code>animation</code> properties to animate items shifting positions.</p>Click to reveal answer
What attribute do you use to set the HTML tag for
<TransitionGroup>?✗ Incorrect
The tag attribute sets which HTML element <TransitionGroup> renders as.
Why is the
key attribute important inside <TransitionGroup>?✗ Incorrect
Vue uses key to track items and animate them correctly when the list changes.
Which CSS class is NOT automatically added by Vue during
<TransitionGroup> animations?✗ Incorrect
v-hover is not related to Vue's transition classes.
What does the
move class do in <TransitionGroup> animations?✗ Incorrect
The move class is used to animate the shifting of list items.
Which Vue feature helps animate list changes smoothly?
✗ Incorrect
<TransitionGroup> is designed for animating list changes.
Explain how
<TransitionGroup> helps animate lists in Vue and why keys are important.Think about how Vue knows which item changed and how it animates that change.
You got /3 concepts.
Describe how to use CSS classes to animate items moving positions inside a
<TransitionGroup>.Focus on the special class Vue adds for moving items.
You got /3 concepts.