- For browser builds, the global export was renamed to
XState
(previously:xstate
). - The
data
property of theStateNode
config is now an "Assigner" or "PropertyAssigner" instead ofany
. - The
new State()
constructor now takes an object with properties for each parameter, instead of positional arguments. - New static method:
State.create({ ... })
which does the same as above. - The
error(...)
action creator now takessrc
as a second argument. For errors from an invoked service, the service ID will populate thesrc
. onError: ...
transition property added to invoke config.- Numeric targets are now being coerced to strings, to resolve edge-case issues e.g.,
3 !== '3'
when selecting state transitions. actionTypes.null
is nowactionTypes.nullEvent
, which alleviates some autocomplete issues in VS Code, etc.- Instead of
params
andcontent
,data
will be used (polymorphic property - can take an "Assigner" or "PropertyAssigner") - Done data is now correctly passed to the
'done.state'
event. #224 - The
process.env.NODE_ENV
check will no longer produce errors in browser environments. #227 - The
Machine
interface was renamed toStateMachine
to prevent naming conflicts. #231 - History state edge-cases are now resolved, and usage of the
history
property to indicate a history state is deprecated (usetype: 'history'
instead).