makeStateKey
function
stable
Create a StateKey<T> that can be used to store value of type T with TransferState.
makeStateKey
StateKey<T>Create a StateKey<T> that can be used to store value of type T with TransferState.
Example:
const COUNTER_KEY = makeStateKey<number>('counter');let value = 10;transferState.set(COUNTER_KEY, value);@paramkey
string@returns
StateKey<T>Description
Create a StateKey<T> that can be used to store value of type T with TransferState.
Example:
const COUNTER_KEY = makeStateKey<number>('counter');let value = 10;transferState.set(COUNTER_KEY, value);Jump to details