how can we access the state variable for setter and getter using computed #2338
Unanswered
anilkumarthakur60
asked this question in
Help and Questions
Replies: 1 comment 1 reply
-
you don't need the computed setter, it's really just a wrapper that adds nothing in that case. You have two options:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
we have a child component that receives a prop store. The store prop contains various state variables. One of these state variables is formRef, which you need to access and modify using a computed property. The computed property should act as both a getter and a setter for the formRef state variable. How can you implement the computed property to access and modify the formRef state variable by passing the store ?
my store
parent component
i am receiving the error as ESLint: Unexpected mutation of "store" prop.(vue/no-mutating-props) in child component
in create component
Beta Was this translation helpful? Give feedback.
All reactions