부모 컴포넌트에서 자식 컴포넌트로 메소드 (함수)를 보내는 방법


#1

How do I send a method (function) from a parent component to a child component?

You know how to send a value, but do you have to create a method (function) separately?

Thanks for giving us a simple example.


#2

parent

<child :fun="fun"/>

child
{
props: [‘fun’], // this.fun(params) to use
}