Back to vue_devs
Reported Comment: "I like to put computed properties in the `setup`..."
Open
All reports for this content are collected in this issue.
First reported on Jan 2, 2025 by miniatureDeafeningMysteriousTeacher
vue_devs
Original comment
1 report
I like to put computed properties in the setup function, in which case it looks like this:
const users = [
{ name: 'Alice', active: true },
{ name: 'Bob', active: false },
{ name: 'Carol', active: true }
]
const activeUsers = computed(() => {
return users.filter(user => {
return user.active;
})
})
Activity Feed
- the comment was reported byminiatureDeafeningMysteriousTeacher 1 year ago
test reporting a comment Jan 2
Mod Actions
Please log in to access moderation features
Original Poster Actions
Please log in to access original poster features
Leave a comment
Vue.js Developers
vue_devsA forum for discussions, questions & answers about Vue.js
