I am facing a problem which is better to describe it by a similar example:
const ParentComponent = () => { const doSomething =() => { // code here } return