-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call-child-function-from-parent-component-in-react/ #9
Comments
Thanks, nice example |
Thank you Dilshan, this worked for me. |
Works great, thank you! |
so it pass the alertUser function to parent using useEffect right? |
Does this work with React 18 best practices https://beta.reactjs.org/learn/synchronizing-with-effects# ? |
@muammarFaiz In that case, you would need add |
How To Call Child Function From Parent Component In React | Dilshan Kelsen
One way to call a child component's function from its parent is with the help of the useRef hook . Here's the gist of it: We pass a…
https://dilshankelsen.com/call-child-function-from-parent-component-in-react/
The text was updated successfully, but these errors were encountered: