I have a button in the parent component and I want to pass that click action to the child component, when I click the button I want to use that click to get data from backend, the point is just to pass click action or function to child
const parent = ()=>{
return (
<>
<button onclick={handlcklick}>Click me</Button>
</>
)
}
use that handlclick in child
const child = ()=>{
const handlclick =(e)=>{
alert("hello")
}
return (
<>
</>
)
}