Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #5111

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Version Packages #5111

merged 1 commit into from
Nov 12, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 28, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #4954 8c4b70652acaef2702f32435362e4755679a516d Thanks @davidkpiano! - Added a new transition function that takes an actor logic, a snapshot, and an event, and returns a tuple containing the next snapshot and the actions to execute. This function is a pure function and does not execute the actions itself. It can be used like this:

    import { transition } from 'xstate';
    
    const [nextState, actions] = transition(actorLogic, currentState, event);
    // Execute actions as needed

    Added a new initialTransition function that takes an actor logic and an optional input, and returns a tuple containing the initial snapshot and the actions to execute from the initial transition. This function is also a pure function and does not execute the actions itself. It can be used like this:

    import { initialTransition } from 'xstate';
    
    const [initialState, actions] = initialTransition(actorLogic, input);
    // Execute actions as needed

    These new functions provide a way to separate the calculation of the next snapshot and actions from the execution of those actions, allowing for more control and flexibility in the transition process.

@xstate/[email protected]

Patch Changes

@xstate/[email protected]

Patch Changes

@xstate/[email protected]

Patch Changes

@xstate/[email protected]

Patch Changes

@xstate/[email protected]

Patch Changes

@xstate/[email protected]

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch from 1fbf0ba to 4eb0c8c Compare November 12, 2024 13:25
@github-actions github-actions bot force-pushed the changeset-release/main branch from 4eb0c8c to bfd0b93 Compare November 12, 2024 13:50
@davidkpiano davidkpiano merged commit 65088b6 into main Nov 12, 2024
@davidkpiano davidkpiano deleted the changeset-release/main branch November 12, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant