How to invoke a parent function from within a child (React)

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Hi all,
    In this video I show you how to invoke a parent function from within a child component in React. It's super easy and only takes a few minutes to understand.
    In short, you create a function in the parent component and use props to pass down another function into the child. The function which is passed down triggers the function in the parent from within the child when clicked/accessed via props. If you don't understand what I mean, just watch the video and I hope it helps. If something is not clear after watching the video, please leave a comment. I am open to feedback.
    The song in the outro is from this video • Video
    the artist is Jordan Schor
    and the song is Home (feat. Harley Bird) [NCS]
    / jordan-schor-home-feat...

КОМЕНТАРІ •