How To Call Function Inside Child Component From Parent Component Using useRef hook ?
To call a function inside a child component from a parent component, first, create a useRef hook in the parent component. Then, pass this reference as a prop to the child component. In the child component, use this reference wherever needed to access or call the function from the parent. Prerequisit