Class StateHandler

The StateHandler Singleton class provides the means to interact with an automatically registered ServiceWorker, when instantiated in a browser environment or, when the StateHandler is instantiated within a NodeJS environment, a new require('worker_threads').Worker() is forked. Within either of these Threads the StateWorker is executed and handles the deployment of Stores and dispatching Store.Actions against them. The same goes for Effects, whose implantation the StateWorker handles.

The functionality provided by the StateHandler is best consumed by applying on of the Stateful or Implant decorators, as those provide easier and higher-level interfaces to the functionality provided by this Singleton class.

Decorator

Singleton

See

StateWorker

Constructors

Properties

Private static ReplaySubject used as the StateHandler loader. This loader emits once after the StateHandler has been successfully initialized.

The worker Thread is the main background workhorse, depending on the environment, either a navigator.serviceWorker is registered or a new require('worker_threads').Worker() NodeJS equivalent will be forked.

kernel: Kernel

Factored-in kernel property linking the Kernel.

Decorator

Factor

Methods

Generated using TypeDoc