R
R
reinmaker902020-10-07 22:27:49
Vue.js
reinmaker90, 2020-10-07 22:27:49

How to pass value between components?

There is a component, for example, during some action it adds numbers:

data:()=>({
  a:1,
  b:2,
  culc
}),
methods:{
  getNum(){
    return this.calc = this.a + this.b
  }
}

How can I then use the data that I return to calc in another component, how can I transfer it so that I can work with the value that I received from the outside?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-10-07
@yarkov Vue.js

Down the hierarchy - props.
Up the hierarchy - events.
That does not work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question