I want my React functional component to call a function in its parent.
I was able to do this with class components like so:
<MyChild func={this.functionname} />
But I'm having trouble access this.functionName
withtin my child component, which is a functional component.
How can I access this in the child functional component, *as well as within all of its functions (e.g. useCallback
and useEffect
)