'How to call func in parent component in React
I have a btn in parent component and func in child component
<parent>
<child/>
<button onClick={myFunc}>call func</button>
</parent>
<child>
const myFunc = () => {
...
}
return{
}
</child>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
