Created
April 17, 2022 23:59
-
-
Save MarekZeman91/e2b7210bcbb67a7e5b4b398124b242a7 to your computer and use it in GitHub Desktop.
This file contains 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
import { useRef } from 'react'; | |
export function useScope<T>(values: T): T { | |
return Object.assign(useRef({} as T).current, values); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment