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

Enhance scenario interface #27

Open
yuriyyakym opened this issue Nov 17, 2023 · 0 comments
Open

Enhance scenario interface #27

yuriyyakym opened this issue Nov 17, 2023 · 0 comments
Labels
enhancement New feature or request idea
Milestone

Comments

@yuriyyakym
Copy link
Owner

It may handle action and readable states.

Current approach:

const items = state();
const createItem = action();

scenario(items.events.changed, () => { /* ... */ });
scenario(createItem.events.invoked, () => { /* ... */ });

Suggested syntax sugar, which would by default take changed event from states, and invoked event from action.

scenario(items, () => { /* ... */ });
scenario(createItem, () => { /* ... */ });
@yuriyyakym yuriyyakym added enhancement New feature or request idea labels Nov 17, 2023
@yuriyyakym yuriyyakym added this to the Ideas milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea
Projects
None yet
Development

No branches or pull requests

1 participant