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

Add always #1249

Merged
merged 4 commits into from
Jun 24, 2020
Merged

Add always #1249

merged 4 commits into from
Jun 24, 2020

Conversation

davidkpiano
Copy link
Member

@davidkpiano davidkpiano commented Jun 19, 2020

This PR adds support for the always transition, which works exactly the same as eventless transitions:

on: {
- '': 'someTarget'
},
+always: 'someTarget'

As the tests show, this is not a breaking change. The original way for defining eventless transitions will continue to work.

TODO:

  • Docs
  • Tests

@changeset-bot
Copy link

changeset-bot bot commented Jun 19, 2020

🦋 Changeset is good to go

Latest commit: 72d2eef

We got this.

This PR includes changesets to release 7 packages
Name Type
xstate Minor
@xstate/analytics Major
@xstate/graph Major
@xstate/immer Major
@xstate/react Major
@xstate/test Major
@xstate/vue Major

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 19, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 72d2eef:

Sandbox Source
angry-solomon-rqnz6 Configuration
peaceful-jennings-5rsbs Configuration

@Andarist
Copy link
Member

Should we introduce a deprecation warning for '' right away?

@davidkpiano
Copy link
Member Author

Going to merge this in (all comments resolved) - won't release yet, in case a critical change is needed. @Andarist

@davidkpiano davidkpiano reopened this Jun 24, 2020
@davidkpiano davidkpiano merged commit 1273d72 into master Jun 24, 2020
@davidkpiano davidkpiano deleted the davidkpiano/always branch June 24, 2020 21:34
@github-actions github-actions bot mentioned this pull request Jun 24, 2020
@wildskyf
Copy link
Contributor

we should also update the docs here:
https://xstate.js.org/docs/guides/events.html#null-events

@davidkpiano
Copy link
Member Author

we should also update the docs here:
xstate.js.org/docs/guides/events.html#null-events

Feel free to make a PR for this, or an issue please

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.

None yet

3 participants