github statelyai/xstate @xstate/effect@1.0.0-beta.2

pre-releaseone hour ago

Minor Changes

  • 417e5f4: Callback, event observable, listener, and subscription actors now process events they send to a parent in their own transitions. createEffectEventStreamLogic actors do the same. Inspection reports each outgoing event on the source transition, and subscribers receive a snapshot notification for that transition.

  • 74f51ef: Export causeFromError and UnwrapEffectFailure to inspect typed actor failures while preserving the original Effect Cause. Ordinary errors are wrapped with Cause.fail.

    import { Cause } from 'effect';
    import { causeFromError } from '@xstate/effect';
    
    const failure = Cause.findErrorOption(causeFromError(event.error));

Don't miss a new xstate release

NewReleases is sending notifications on new releases.