awai icon indicating copy to clipboard operation
awai copied to clipboard

Enhance scenario interface

Open yuriyyakym opened this issue 9 months ago • 0 comments

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 avatar Nov 17 '23 14:11 yuriyyakym