The functions and classes found within the @sgrud/state module are
intended to ease the implementation of Stateful data Stores
within applications built upon the SGRUD client
libraries. Through wrappers around the IndexedDB and SQLite3
storage Store.Drivers, data will be persisted in every environment.
Furthermore, through the employment of Effects, side-effects like
retrieving data from external services or dispatching subsequent
Store.Actions can be easily achieved.
The @sgrud/state module includes a standalone JavaScript bundle which
is used to fork a background Thread upon import of this module. This
background Thread is henceforth used for Store.State mutation
and persistance, independently of the foreground process. Depending on the
runtime environment, either a navigator.serviceWorker is registered or a
new require('worker_threads').Worker() NodeJS equivalent will be forked.
@sgrud/state
- The SGRUD State Machine.The functions and classes found within the
@sgrud/state
module are intended to ease the implementation of Stateful data Stores within applications built upon the SGRUD client libraries. Through wrappers around the IndexedDB and SQLite3 storage Store.Drivers, data will be persisted in every environment. Furthermore, through the employment of Effects, side-effects like retrieving data from external services or dispatching subsequent Store.Actions can be easily achieved.The
@sgrud/state
module includes a standalone JavaScript bundle which is used to fork a background Thread upon import of this module. This background Thread is henceforth used for Store.State mutation and persistance, independently of the foreground process. Depending on the runtime environment, either anavigator.serviceWorker
isregister
ed or anew require('worker_threads').Worker()
NodeJS equivalent will be forked.