Thanks!
This wasn't an example of a render prop but of general dependency injection.
I tried to show how DI leads to RP. :)
"you said a render prop is a function which the child component invokes"
No no, the children will be returned by this function, the parent invokes it, because the parent gets it passed via the render prop. :)
returned
Gotcha! Thanks for clarification.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks!
This wasn't an example of a render prop but of general dependency injection.
I tried to show how DI leads to RP. :)
"you said a render prop is a function which the child component invokes"
No no, the children will be
returned
by this function, the parent invokes it, because the parent gets it passed via the render prop. :)Gotcha! Thanks for clarification.