Allow getters to have a setter defined
See original GitHub issueLike computed properties
getters: {
stuff: {
get() {}
set() {}
},
otherStuff() {
// only getter
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Getters and Setters in Java Explained - freeCodeCamp
Getters and setters allow control over the values. You may validate the given value in the setter before actually setting the value.
Read more >Property getters and setters - The Modern JavaScript Tutorial
Accessor properties are represented by “getter” and “setter” methods. In an object literal they are denoted by get and set : let obj...
Read more >@Getter and @Setter - Project Lombok
A default getter simply returns the field, and is named getFoo if the field is called foo (or isFoo if the field's type...
Read more >Allow getters to have a setter defined · Issue #447 · vuejs/pinia
At the moment i just use a computed getter/setter, which works as expected. //vue component. const themes = useThemes(); const ...
Read more >Significance of Getters and Setters in Java - Baeldung
Getters and Setters play an important role in retrieving and updating the value of a variable outside the encapsulating class.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jd-solanki I don’t know if this is the preferred syntax now, but what I’ve been doing is this:
I assume this is the “new function syntax” mentioned above, but I don’t really know – it doesn’t seem to be documented anywhere in the Guide. It’s less structured than the
state
/getters
/actions
syntax but much more flexible.this would be cool. At the moment i just use a computed getter/setter, which works as expected.
//vue component
//store