Created
December 30, 2022 23:27
-
-
Save kivircik-parantez/7f755357a2b55239779fbc52a9f9f7dd to your computer and use it in GitHub Desktop.
Pass Data Down to Child
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Parent() { | |
const data = useSomeAPI(); | |
// ... | |
// ✅ Good: Passing data down to the child | |
return <Child data={data} />; | |
} | |
function Child({ data }) { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment