How to access data in onMutated #10117
Unanswered
MCLCG
asked this question in
Help/Questions
Replies: 1 comment 1 reply
-
You can't access data from Options API in setup. That's by design. We strongly recommend not mixing those APIs. I'll move this to Discussions so the community can help out with finding you a proper solution |
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
-
Vue version
3.3.11
Link to minimal reproduction
https://github.com/MCLCG/vue3-new-feature/blob/4b3648f247638f147396e171f7e70a0036083665/project/src/components/OptionLiftCycle.vue#L56
Steps to reproduce
I want to obtain the data of the optional API in onMounted
What is expected?
Can be implemented without using getCurrentInstance
For example, You can use the 'props' attribute in the onMounted callback function to access data data.
What is actually happening?
Unable to retrieve data from props
System Info
No response
Any additional comments?
No response
Beta Was this translation helpful? Give feedback.
All reactions