Skip to main content

UseGlobalStateResT

import { type UseGlobalStateResT } from '@dr.pogodin/react-global-state';

UseGlobalStateResT is the type of result returned by the useGlobalState() hook.

It is defined as the generic type:

type UseGlobalStateResT<ValueT> = [ValueT, SetterT<ValueT>];

a tuple of a value, and value setter function, and essentially it is the alias for the type of result returned by the standard React's useState() hook (and SetterT is the alias for the standard React's state setter function).

Generic Parameters

  • ValueT — The type of a value from the state.