Aug 16, 2022
I do have a reason for not using a simple hook for this, which is I didn't think of it. This is very much an easier way to do it.
The only thing I see as a difference between the two approaches, thinking about it now, is the need to have one hook per dependency, whereas my solution uses one hook where you can provide the abstraction you need as a generic type and get back what you asked for.