Skip to main content

Function: useGlobalState

useGlobalState<T>(key): [T | undefined, SetGlobalStateFunction<T>]

Type parameters

NameType
Tany

Parameters

NameType
keystring

Returns

[T | undefined, SetGlobalStateFunction<T>]

Defined in

onekijs/packages/onekijs-framework/src/app/useGlobalState.ts:8

useGlobalState<T>(key, defaultValue): [T | undefined, SetGlobalStateFunction<T>]

Type parameters

NameType
Tany

Parameters

NameType
keystring
defaultValueundefined

Returns

[T | undefined, SetGlobalStateFunction<T>]

Defined in

onekijs/packages/onekijs-framework/src/app/useGlobalState.ts:9

useGlobalState<T>(key, defaultValue): [T | null, SetGlobalStateFunction<T>]

Type parameters

NameType
Tany

Parameters

NameType
keystring
defaultValuenull

Returns

[T | null, SetGlobalStateFunction<T>]

Defined in

onekijs/packages/onekijs-framework/src/app/useGlobalState.ts:10

useGlobalState<T>(key, defaultValue): [T, SetGlobalStateFunction<T>]

Type parameters

NameType
Tany

Parameters

NameType
keystring
defaultValueT

Returns

[T, SetGlobalStateFunction<T>]

Defined in

onekijs/packages/onekijs-framework/src/app/useGlobalState.ts:11