Sorting a list with a computed property

Ordering inside a v-for with a filter is another thing that was considered for removal in Vue 1 and didn't survive in the current version.

Sorting a list with a computed property offers much more flexibility and we can implement any custom logic for ordering. In this recipe, you will create a list with some numbers within; we will sort the list using them.

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.