awai
awai copied to clipboard
Enhance scenario interface
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, () => { /* ... */ });