Sometimes you need to do something after the component has updated. For example, you may need to measure the component after the update, in order to perform an imperative action like an animation. There's a callback for that, and unsurprisingly it's called updated().
The component on the right displays a message when you click the button. It's not very exciting, though. It could use some kind of transition.
Add the following updated() method to the component:
This isn't the simplest way to implement this particular animation, but it demonstrates measuring the DOM after an update, a crucial task for many animations.
The updated() callback is different from the other update cycle callback in that reactive property updates that occur during updated()will trigger a new update.