npm xstate 4.1.0

latest releases: 5.12.0, 5.11.0, 5.10.0...
5 years ago
  • For browser builds, the global export was renamed to XState (previously: xstate).
  • The data property of the StateNode config is now an "Assigner" or "PropertyAssigner" instead of any.
  • 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 takes src as a second argument. For errors from an invoked service, the service ID will populate the src.
  • 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 now actionTypes.nullEvent, which alleviates some autocomplete issues in VS Code, etc.
  • Instead of params and content, 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 to StateMachine 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 (use type: 'history' instead).

Don't miss a new xstate release

NewReleases is sending notifications on new releases.