DEV Community

Discussion on: ⚛️ React: Hooks vs. Render Props vs. Higher-Order Components 👨‍🔬

Collapse
vuesomedev profile image
Gábor Soós

They don't need to know, just like with Dependency Injection in Angular.

Thread Thread
bettercodingacademy profile image
Better Coding Academy Author

Drawing a similarity between Angular and React here isn't particularly beneficial.

In React, tracking down where a particular prop comes from within a nest of multiple HOCs is a huge pain and a massive code smell that Hooks has since addressed beautifully.

Thread Thread
vuesomedev profile image
Gábor Soós

Aren't we talking about the dependencies of a component?

I don't know why it is necessary to know the source of a dependency inside a component.