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

[FEATURE] add Hook for easier statechart matching #509

Open
grandevel opened this issue May 20, 2021 · 0 comments
Open

[FEATURE] add Hook for easier statechart matching #509

grandevel opened this issue May 20, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@grandevel
Copy link
Collaborator

grandevel commented May 20, 2021

New feature request in overmind statecharts:

React-states provides a match function to match a given state. Rather than implement something custom everytime to match states in a chart, it would be useful to have a hook which can be used - something like:

const isInSomeState = useMatchState('MY_CHART', ['STATE1', 'STATE2']);

It is then much easier to control rendering or props - for example
Click me! or {isInSomeState && Click me also!}

@grandevel grandevel added the bug Something isn't working label May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants