DEV Community

Discussion on: Render Props and Higher Order Components

Collapse
 
kayis profile image
K

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. :)

Collapse
 
kepta profile image
Kushan Joshi

Gotcha! Thanks for clarification.