Skip to main content

Function: getState()

function getState<T>(key, options?): T | null

Get a value from the state. If the value does not exist, null is returned.

Type Parameters

Type ParameterDefault type
Tstring

Parameters

ParameterTypeDescription
keystringThe key to get the value for.
options?GetStateOptions-

Returns

T | null

The value for the given key, or null if the key does not exist.