Last active
January 18, 2024 06:28
-
-
Save TheLucifurry/2110e7c101a69ae0837cde8dc6a686ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function useInstance<ElementType extends HTMLElement = HTMLDivElement>(component?) { | |
| return shallowRef< | |
| typeof component extends undefined | |
| ? ElementType | |
| : InstanceType<typeof component> | |
| >(null) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment