0
0
Vueframework~5 mins

TransitionGroup for lists in Vue - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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>?
Aas
Btype
Celement
Dtag
Why is the key attribute important inside <TransitionGroup>?
ATo identify each list item uniquely for animations
BTo style the items
CTo add event listeners
DTo set the item text
Which CSS class is NOT automatically added by Vue during <TransitionGroup> animations?
Av-enter-active
Bv-hover
Cv-move
Dv-leave-from
What does the move class do in <TransitionGroup> animations?
AAdds shadows
BChanges item colors
CAnimates items moving positions
DDisables animations
Which Vue feature helps animate list changes smoothly?
A<code>&lt;TransitionGroup&gt;</code>
B<code>&lt;KeepAlive&gt;</code>
C<code>&lt;Teleport&gt;</code>
D<code>&lt;Suspense&gt;</code>
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.