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

Optimize state.can() #2804

Merged
merged 5 commits into from
Nov 25, 2021
Merged

Optimize state.can() #2804

merged 5 commits into from
Nov 25, 2021

Conversation

davidkpiano
Copy link
Member

This PR optimizes state.can() by reading the transition data before evaluating the actions (such as assign(...)), which do not need to be evaluated in order to determine if the state will change.

Fixes #2803

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2021

🦋 Changeset detected

Latest commit: 6150674

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate Patch

Not sure what this means? Click here to learn what changesets are.

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

@ghost
Copy link

ghost commented Nov 11, 2021

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

@davidkpiano
Copy link
Member Author

@Andarist Is this good to go?

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.

can() will trigger assign()
2 participants