What about CompositionAPI import?
professrr opened this issue · comments
professrr commented
How to import something like loadScript
using the Composition API?
James commented
I personally haven't made the switch yet. Looking at the documentation, supporting Vue 3 may be backwards compatible, so I'll take a crack at it.
bisubus commented
From #20, it would be as simple as const useLoadScript = () => ({ loadScript, unloadScript })
, although there's no reason to have a hook for the sake of hook. Named exports are enough because it doesn't do anything specific to component instance.
Bjørnar Hetlesæther commented
Composition API is now supported for vue 3. Added in #20