Repository navigation
v0.0.5
·
30 commits
to refs/heads/main
since this release
Immutable
release. Only release title and notes can be modified.
Breaking changes
onInvalidTransitionreceives anInvalidTransitionErrorinstead of{ from, to }. Itsreasonis"disallowed"or"stale". Itsstateholds the definition'sname(fromdefineTransitionalState(name)),from, andto, and itstickholds the clock ticks behind a stale transition. Throw it to fail loudly, or report it.initialize({ onInvalidTransition: (error) => { throw error; }, });
case([...])is a type error when its list names the samekindtwice.
New
- Stale transitions are rejected. A state's
transitionbelongs to the state it came with. Once the state has changed through anyset,update, ortransition, calling an earliertransitiondoes nothing and reports a"stale"InvalidTransitionError. This keeps a slow effect, such as a request that resolves after the user has moved on, from overwriting a newer state. InvalidTransitionErroris exported.- The packages are published to JSR as well as npm.
Fixes
@ghostry/finity-reactjs:setandupdatereturn the new state. They returned the updater function instead.