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 support for '*' transition entry #13

Merged
merged 5 commits into from Feb 18, 2021
Merged

Conversation

dawidgorny
Copy link
Contributor

@dawidgorny dawidgorny commented Nov 26, 2020

Inspired by a state machine in Unity where you can define transitions from 'Any'. This way you can avoid repetition if there is some set of transitions always available no matter in which state we are.

const machine = nanostate('idle', {
  '_any': { 
    'reset': 'idle'
  },

  // ...

}

Closes #14

@dawidgorny dawidgorny marked this pull request as ready for review November 26, 2020 16:06
@goto-bus-stop goto-bus-stop changed the title add support for '_any' transition entry add support for '*' transition entry Feb 18, 2021
@goto-bus-stop goto-bus-stop merged commit 8e9ca59 into choojs:master Feb 18, 2021
@goto-bus-stop
Copy link
Member

oops, i still dont have publish access 🙈

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.

Support transition from 'Any'
2 participants