Top "Computed-properties" questions

Computed properties are functions declared as property.

Reactjs setState() with a dynamic key name?

EDIT: this is a duplicate, see here I can't find any examples of using a dynamic key name when setting …

javascript reactjs computed-properties
Instance member cannot be used on type

I have the following class: class ReportView: NSView { var categoriesPerPage = [[Int]]() var numPages: Int = { return categoriesPerPage.count } } Compilation fails with …

swift instantiation getter-setter computed-properties
Use placeholders in yaml

Is there a way to use placeholders in yaml like this: foo: &FOO <<propname>>: type: …

yaml computed-properties indirection template-variables
Method vs Computed in Vue

What is the main difference between a method and a computed value in Vue.js? They look the same and …

javascript methods vue.js vuejs2 computed-properties
Watching computed properties

I have a component with the following hash { computed: { isUserID: { get: function(){ return this.userId? } } } Should I be watching isUserID …

vue-component vuejs2 computed-properties
Vue.js computed property not working

I have a users data object which has a first_name and last_name and a computed property which returns …

vue.js computed-properties
VueJS How can I use computed property with v-for

How can I use computed property in lists. I am using VueJS v2.0.2. Here's the HTML: <div id="el"&…

javascript vue.js computed-properties
How to use array reduce with condition in JavaScript?

So I have an array const records = [ { value: 24, gender: "BOYS" }, { value: 42, gender: "BOYS" }, { value: 85, gender: "GIRLS" }, { value: 12, gender: "GIRLS" }, { value: 10, …

javascript arrays vue.js computed-properties
Cannot assign to property: 'xxxx' is a get-only property

I'm using a computed property to get the last book in my books array. However, it seems I can't use …

swift computed-properties
How to access a computed property from a method in a Single File Component with Vue.js

I have a normal single file component which has both a computed property and some methods: <template>...</…

vuejs2 vue-component computed-properties