Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tinganho
· 4y ago · 0 comments
I think in the class world this is normally done by writing a service and injecting it on the constructor of the parent class. Since, React doesn't have DI built-in, it becomes problematic with the injection. hooks are essentially classes imo.
Comments
[–]
arcosdev
4y ago
How does it become problematic? You just pass in dependencies as arguments to functions or components.