Creating custom SolidJS hook that can be used in a global scope - SolidJS