I am new to the world of React.
Is there a way to register a custom event in the child component and pass the data to the component from its parent component? I know we can pass params through props or state but I am looking something related to events.
Example:
Child Component:
const onCustomEvent = (data) =>{
console.log("Custom event called from parent",data)
}
Parent Component:
fire that onCustomEvent() from parent