There's more...

Here, we cover two subcases of the preceding recipe: switching between more than two elements and binding the key attribute.

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.