Options
Menu

Interface SharedUnitConfig<T>

Shared configuration options for all the Units.

Hierarchy

Common Properties

Units Properties

Common Properties

Optional replay

replay: boolean

A flag to control the replay behaviour of a Unit. It decides whether the value should be replayed when you subscribe to the default Observable.

default

true

Units Properties

Optional cacheSize

cacheSize: number

Optional config option to set the cache size. It can be minimum 1, and maximum Infinity. Otherwise, if it's not provided, or it's not valid, the default cache size 2 will be used.

default

2

Optional distinctDispatchCheck

distinctDispatchCheck: boolean

An optional flag to disable/enable the distinct value check on the dispatched values.

default

false

Optional immutable

immutable: boolean

An optional flag to make the Unit's value immutable.

default

false

Optional persistent

persistent: boolean

An optional flag to make the Unit persistent, using LocalStorage or SessionStorage. An id (see BaseConfig.id) is mandatory to make it work.

default

false

Optional storage

storage: Storage

The Storage to be used for storing the value if the Unit is persistent.
It can be either LocalStorage or SessionStorage or any other API, that implements Storage API interface.

default

Configuration.storage