History Vue nested deep — v-model parent-component: mounted set, var -> child-component: props = undefined?

Why, when the parent component variable "going" in hook mounted and is passed to a subreport in the parent component-child via an attribute that is then picked up using the props, then the variable is initially undefined and when it is accessed in the template - error.

if the parent variable to collect computed using all the rules. but if you change a variable in the child she "returns" to the parent

there is such an example where the nesting of components more than one level - a task to change the model entity in the parent, the need for such nesting - reuse of application components... the question between the lines is that the decision is not optimal... where is the truth?

have forknell another example - got rid of the heresy in computed - translated all through the method of model building. but where is the elegance? back to the top of the issue - initially, the data is not defined - have to wait for their definition and to hide the template condition v-if="dataModel"
March 23rd 20 at 19:42
1 answer
March 23rd 20 at 19:44
Because mounted() is called when the component is mounted. Can move the definition in the datamodel created() hook should work.

Find more questions by tags Vue.js