Repository navigation
v0.0.4
·
35 commits
to refs/heads/main
since this release
Immutable
release. Only release title and notes can be modified.
Breaking changes
assertNeveris renamednever.- State values must be non-nullish.
useState,Getter,Setter, and a custom integration'sConfig.useStatenow constrain their type toT extends {}.
New
onInvalidTransitionis an option ofinitializein every package. It's called with{ from, to }whentransition()asks for a transition that the state's definition doesn't allow.
Behavior change
- A disallowed transition no longer throws. The state stays as it is, and
onInvalidTransitionis called if it's set. The types already reject a disallowedtransition()call, so this only happens through a cast.
Compatibility
- The build output targets ES2015 instead of ES5.
Docs: Invalid transitions