Releases: swipely/state-trooper
State Trooper 2.1.2
Fixed the TypeScript declaration signatures for Cursor#deref
and Cursor#refine
.
Fixed a bug where a stakeout receives an update with a string path instead of an array path.
State Trooper 2.1.1
This release adds support for an optional "path" parameter to Cursor.deref()
.
State Trooper 2.1
This release adds a new top-level API, StateTrooper.patrolRunLoop
, which wraps the calls to js-csp
needed to implement a cursor update loop. Using this API, the application no longer needs to directly depend on js-csp
.
State Trooper 2
State Trooper 2.0 has a new implementation that replaces immutable-js
with immutability-helper
. This means that the internal state is stored using plain JS objects, not ImmutableJS structures. This provides a significant performance improvement when inserting large object graphs into cursor state. Also, no more deref()
vs derefJS()
confusion.
Also new in this release is a declaration file for TypeScript!
https://www.typescriptlang.org/docs/home.html
Cursors for everything!
The major change in this release is that persisters and fetchers now operate on cursors instead of channels.
This means that every state change applications will go through a cursor, making the api more consistent.
This also enables a fix that ensures state changes are applied in succession. This was needed in cases where several cursor.replace/cursor.set calls were done in the same render tick, and the slowest of those calls had a potential to overwrite state changes that the fast one did. Now the complexity of that is inside of StateTrooper, ensuring that a cursor never tries to set anything with out of date state.