Excellent question! In that case I think I would just move the loading logic into a new function that I can then return from the hook as well:
Thanks for the answer.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.