When you want a variable to stay in local storage and load it with a single line of code.

T is type of data to store.

Type Parameters

  • T

Constructors

Properties

Accessors

Methods

Constructors

Properties

change: EventEmitter<T> = ...

Emits when the stored data is changed.

defaultValue: T

Value that is used if it's not stored before.

key: string

Unique key of this data.

lastValue: T = ...

Last value that was set, can be changed without effecting storage.

Accessors

Methods