statelyai / xstate

Actor-based state management & orchestration for complex app logic.
https://stately.ai/docs
MIT License
26.51k stars 1.22k forks source link

[core] Transition function #4954

Open davidkpiano opened 1 week ago

davidkpiano commented 1 week ago

This PR adds the transition(…) function for returning a [snapshot, actions] tuple given the machine, state, and event.

Its main use-case is for server-side workflows and a pure way of handling state transitions for actor logic.

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 96ba826dcf06c4d310779e60efc96eec25ea03a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

with-heart commented 6 days ago

Just a reminder to remove commented lines before merging 💜