score:0

As per my understanding, you've two components: ItemSection and ListItems and you want to call a function in ListItems, that is defined in ItemSection? Is it the correct understanding?

If yes, then you can define your function in ItemSection and send that function as prop in ItemSection

In ItemSection:

    <ListItems sampleFunction = {(e)=>sampleFunction(e)}/>

In ListItems:

    interface Props{
    sampleFunction: Function;
    }

and:

    <button OnClick = {props.sampleFunction}>{props.title}</button>

This is just a pseudo code.


Related Query

More Query from same tag