Open
Description
What about an idea to make getter
methods be a generator function? It can allow us to do this for example:
const todos = map({
addActionTypes: ['ADD_FEW_TODOS'],
*keyGetter(action) {
yield* action.payload.map(todo => todo.id);
},
*itemGetter(action) {
yield* action.payload;
},
});
I think it is an easy way to solve the problem described here #5 (comment)
Metadata
Assignees
Labels
No labels
Activity