UNPKG
@fluent-windows/hooks
Version:
latest (1.0.0)
1.0.0
Fluent-Windows React hooks.
fluent-windows.com
fluent-org/fluent-windows
@fluent-windows/hooks
/
es
/
useGlobal
/
useGlobal.js
13 lines
(12 loc)
•
247 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
/** * Get the current `global this` * * Demo * import { useGlobal } from '
@fluent
-windows/hooks' * * const global = useGlobal() */
function
useGlobal
(
) {
return
typeof
window
!==
'undefined'
?
window
:
global
; }
export
default
useGlobal;