无状态组件怎么调用父组件中的方法。无状态组件中有个方法执行完需要调用父组件的一个方法
也是通过props传值调用
function ChildrenComponent ( props ) { props.fatherFunction() } <div> <ChildrenComponent fatherFunction={functionName} /> </div>
2.1m questions
2.1m answers
60 comments
56.7k users