score:0

change parent class handler function call

return (
        <childclass handler = {(title,category)=>this.searchproduct(title,category)}/>
    )

changes in child class:

 <button variant="contained" color="primary" onclick={(title,category)=>props.handler(search_title,search_category)}>search</button>

score:0

change to following in parent class.

<childclass handler = {this.searchproduct}/>

change in child class

<button
  variant="contained"
  color="primary"
  onclick={() => props.handler(search_title, search_category)}
>
  search
</button>;

Related Query

More Query from same tag