Answer the question
In order to leave comments, you need to log in
What is the correct way to access parent data in vue.js?
I am developing an application using vue-cli.
Structure of components
-Profile
--Settings
---PrivateSettings
That is, in the Profile component, the Settings component is connected, in which PrivateSettings is connected.
In Profile, when creating, I receive and save information about the authorized user.
In Settings, in order not to repeat the request to the server, I address the user through $parent.user, and in PrivateSettings through $parent.$parent.user.
Is it possible to somehow access the property of a particular component, without using $parent?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question